Scheduled Jobs

The primary purpose of the Job Scheduler is the automatic, non-interactive execution of actions according to a user-defined time schedule, e.g.:

  • Checking device status every two hours and running an external application in case of a problem

  • Purging device internal memory every Sunday at 4:00 AM

  • Sending an attendance report by e-mail on the 2nd and 17th of every month at 4:00 PM during 2009 and 2010

  • Upgrading firmware of a thousand devices right now or at 3AM next night

Any action or function available within Iotellect may be scheduled for periodic execution. If the action is interactive and requires user input, input parameters may be pre-defined during scheduling. When the server is restarted, the scheduler can detect if any jobs were missed (not launched) while the server was down.

There are two types of schedules:

  • Simple schedule. According to a simple schedule, an action is executed a set number of times at a fixed interval. It is also possible to specify the start and end of the time interval when the execution takes place.

  • Advanced schedule. This type of schedule allows complex execution patterns, like "execute every minute starting at 2 p.m. and ending at 2:59 p.m. every day" or "execute at 10:15 a.m. on the last Friday of every month during the years 2009, 2011, 2013, and 2015".

Job Configuration

To run, a scheduled job requires the following:

  • Context mask that matches the contexts from which the action will be executed

  • Name of an action to execute

  • Any input parameter(s) required for the action

  • At least one trigger to determine when the action is executed

The scheduler stores its internal state persistently. This means that when the server is restarted, the scheduler can detect if any scheduled jobs were missed (not launched) while the server was down.

Schedulers execute actions in headless (non-interactive) mode. Actions that don't support non-interactive execution cannot be scheduled.

The basic properties of a scheduled job are described here.

Every user has their own set of scheduled jobs.

Related tutorials:

Checking Job Results

For one-time jobs, the View Status action provides access to the Job Results table that contains the status of job execution for each target context individually:

  • Target context, e.g the context function/action was called from

  • Execution status: Pending (not yet executed for this target), In Progress, Successful, Error or Skipped (due to false Condition)

  • Execution date

  • Execution result, e.g. function/action output

  • Error message

Tracking Execution History

Use the Monitor Related Events action of the Job context for viewing:

  • Execution history of a job

  • Errors reported by the executed action

Administering Scheduler

Two contexts are used to administer scheduled jobs: one is the general Scheduled Jobs context, which serves as a container. The other is the Scheduled Job context, which holds the information for one scheduled action.

Built-in Scheduled Jobs

Several scheduled jobs are built into Iotellect Server:

  • Check Incoming Mail. This scheduled job is used by Iotellect Server to fetch mail from the incoming mail server. It is necessary for acknowledging alerts by email.

  • Remove Expired Events. This scheduled job is responsible for the periodic removal of expired events from event history. It's not recommended to delete or reconfigure it.

  • Scheduled Server Restarts. This job restarts Iotellect Server when a restart operation is scheduled by the administrator.

  • Scheduled Server Shutdowns. This job stops an Iotellect Server when a shutdown operation was scheduled by thr administrator.

Was this page helpful?