Scheduling and Executing Jobs

Magpie jobs can be scheduled to run periodically. This is accomplished by creating a schedule. Schedules specify the times at which a job will be executed as well as a context in which to execute the job.

The following is an example of the creation of a new scheduled job:

alter job refresh_property_table add schedule {
  "name": "every_day",
  "expression": "0 0 10 * * ?",
  "schemaName": "my_schema"

This step schedules the job to run daily at 10AM UTC time.

The actual schedule is set using a cron expression. Cron is a often used for scheduling on Linux servers. Magpie has its own internal scheduling system and does not rely on cron to run jobs. Magpie uses the cron expression format because it is widely understood by systems administrators and engineers. More detail on specifying schedules using cron expressions can be found here – Cron Trigger Tutorial.

Once a schedule job has you can check on its status using the execution history command. The screenshot below shows the output of the execution history command within the Magpie notebook.

Was this article helpful?
0 out of 0 found this helpful