Collaboration diagram for Scheduler functions:
![]() |
Defines | |
#define | SCHED_COMMENT L"Funambol Outlook Plug-in scheduler" |
#define | SCHED_PARAM L"schedule" |
#define | NEVER "Never" |
#define | EVERY_DAY "Every day" |
Functions | |
int | setScheduler (const bool enable, const int minutes) |
Set the scheduled task of plugin. | |
bool | getScheduler (int *minutes) |
Get information about scheduled task of plugin. | |
int | setScheduleTask (const char *frequency, const int dayNum, const int minNum) |
Set a Task into task scheduler. | |
int | getScheduleTask (bool *active, int *dayNum, int *minNum) |
Get task info from Task scheduler. | |
int | deleteScheduleTask () |
Delete the schedule task. | |
ITaskScheduler * | initScheduleInstance () |
Call CoInitialize to initialize the COM library and then CoCreateInstance to get the Task Scheduler object. | |
int | getScheduledTaskName (std::wstring &taskName) |
Used to create the scheduled task name: "Funambol Outlook Plug-in - <UserName>". |
int deleteScheduleTask | ( | ) |
Delete the schedule task.
int getScheduledTaskName | ( | wstring & | taskName | ) |
Used to create the scheduled task name: "Funambol Outlook Plug-in - <UserName>".
'Username' is the current Windows user, so each user has a different task.
taskName | [OUT] the name of task |
bool getScheduler | ( | int * | minutes | ) |
Get information about scheduled task of plugin.
minutes | [OUT] the repeating minutes of task |
int getScheduleTask | ( | bool * | active, | |
int * | dayNum, | |||
int * | minNum | |||
) |
Get task info from Task scheduler.
Returns 0 if task found and no errors, -1 if task not found. If task found: frequency, dayNum, minNum and statusCode are set.
active | : [OUT] true if task is active | |
dayNum | : [OUT] repeating every 'dayNum' days | |
minNum | : [OUT] repeating every 'minNum' minutes |
ITaskScheduler* initScheduleInstance | ( | ) |
Call CoInitialize to initialize the COM library and then CoCreateInstance to get the Task Scheduler object.
Sets the lastErrorMsg in case of errors.
pITS,: | pointer to ITaskScheduler interface |
int setScheduler | ( | const bool | enable, | |
const int | minutes | |||
) |
Set the scheduled task of plugin.
enable | true = activate the scheduler false = disable the scheduler (delete the task) | |
minutes | the repeating minutes of task |
int setScheduleTask | ( | const char * | frequency, | |
const int | dayNum, | |||
const int | minNum | |||
) |
Set a Task into task scheduler.
It takes values to insert from Schedule form. If task already exists, it is updated with passed parameters. Starting time is always set to current time (task starts now).
frequency | : NEVER or EVERY_DAY | |
dayNum | : repeate the task every 'dayNum' | |
minNum | : repeate the task every 'minNum' |