2017-06-17 14:56:33 +00:00
|
|
|
import { Task } from './taskbuffer.classes.task';
|
|
|
|
import { Objectmap } from 'lik';
|
|
|
|
export declare class TaskManager {
|
|
|
|
taskMap: Objectmap<Task>;
|
2017-06-18 11:25:09 +00:00
|
|
|
private cronJobMap;
|
2017-06-17 14:56:33 +00:00
|
|
|
constructor();
|
|
|
|
/**
|
|
|
|
* checks if a task is already present
|
|
|
|
* @param taskNameArg
|
|
|
|
*/
|
|
|
|
getTaskByName(taskNameArg: any): Task;
|
|
|
|
/**
|
|
|
|
* adds a Task to the TaskManager
|
|
|
|
* @param taskArg
|
|
|
|
*/
|
|
|
|
addTask(taskArg: Task): void;
|
|
|
|
/**
|
|
|
|
* adds and schedules a task at once
|
|
|
|
* @param taskArg
|
|
|
|
* @param cronStringArg
|
|
|
|
*/
|
|
|
|
addAndScheduleTask(taskArg: Task, cronStringArg: string): void;
|
|
|
|
/**
|
|
|
|
* triggers a task in the TaskManagerByName
|
|
|
|
* @param taskNameArg
|
|
|
|
*/
|
2017-06-18 11:25:09 +00:00
|
|
|
triggerTaskByName(taskNameArg: string): Promise<any>;
|
2017-06-17 14:56:33 +00:00
|
|
|
/**
|
|
|
|
* schedules the task by name
|
|
|
|
* @param taskNameArg
|
|
|
|
*/
|
|
|
|
scheduleTaskByName(taskNameArg: string, cronStringArg: string): void;
|
2017-06-18 11:25:09 +00:00
|
|
|
descheduleTaskByName(taskNameArg: string): void;
|
2017-06-17 14:56:33 +00:00
|
|
|
/**
|
|
|
|
* returns all schedules of a specific task
|
|
|
|
* @param taskNameArg
|
|
|
|
*/
|
|
|
|
getSchedulesForTaskName(taskNameArg: string): void;
|
|
|
|
}
|
|
|
|
export interface ICronJob {
|
|
|
|
cronString: string;
|
|
|
|
taskNameArg: string;
|
|
|
|
job: any;
|
|
|
|
}
|