Create and schedule jobs for the application.
More...
Create and schedule jobs for the application.
◆ FLEX_ScheduledJob
| typedef time_t(* FLEX_ScheduledJob) (void) |
Scheduled Job Function Pointer Declaration. The return value is the time at which the job should next run.
◆ FLEX_JobSchedule()
Reset the schedule for an existing job or add a new job.
- Parameters
-
| [in] | Job | function pointer to the job to be scheduled. |
| [in] | Time | time to run the job. |
- Returns
- FLEX_SUCCESS (0) if succeeded and < 0 if failed.
- Return values
-
| -FLEX_ERROR_ENOMEM | if the maximum number of jobs reached. |
◆ FLEX_ASAP()
| time_t FLEX_ASAP |
( |
void | | ) |
|
Use this function to schedule a job to run immediately, by assigning the return value of this function to the time value at which the job should next run.
- Returns
- time at which the job will next run.
◆ FLEX_Never()
| time_t FLEX_Never |
( |
void | | ) |
|
Use this function to stop a job from being scheduled again, by assigning the return value of this function to the time value at which the job should next run.
- Returns
- time at which the job will next run.
◆ FLEX_SecondsFromNow()
| time_t FLEX_SecondsFromNow |
( |
const unsigned | Secs | ) |
|
Use this function to set the time value at which a job will run next. The job will run Secs after the current run.
- Parameters
-
| [in] | Secs | seconds after to run the job next. |
- Returns
- time at which the job will next run.
◆ FLEX_MinutesFromNow()
| time_t FLEX_MinutesFromNow |
( |
const unsigned | Mins | ) |
|
Use this function to set the time value at which a job will run next. The job will run Mins after the current run.
- Parameters
-
| [in] | Mins | minutes after to run the job next. |
- Returns
- time at which the job will next run.
◆ FLEX_HoursFromNow()
| time_t FLEX_HoursFromNow |
( |
const unsigned | Hours | ) |
|
Use this function to set the time value at which a job will run next. The job will run Hours after the current run.
- Parameters
-
| [in] | Hours | hours after to run the job next. |
- Returns
- time at which the job will next run.
◆ FLEX_DaysFromNow()
| time_t FLEX_DaysFromNow |
( |
const unsigned | Days | ) |
|
Use this function to set the time value at which a job will run next. The job will run Days after the current run.
- Parameters
-
| [in] | Days | days after to run the job next. |
- Returns
- time at which the job will next run.