Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Typos

Restoring enqueued orders and jobs in job chains

Question:

We have a linear job chain of jobs - 1,2,3. Then I kill scheduler JobScheduler after Job1 is complete but while Job2 is still running and then start the scheduler back up. If we then re-start the job chain, will it start at Job2?

...

  1. Persistence of Enqueued Orders

    If an order is enqueued (either for one time processing without any run time or with a run time for repeated processing) then JobScheduler stores this order in the database (in the table SCHEDULER_ORDERS) should a database be used. This behaviour behavior is independent from use of "Managed Jobs" and applies for all orders.

    Changes to the order state that reflect the proceeding of the order in the job chain to the next job node are equally updated in the database. To be transactionally correct the order state is updated after

    • The method spooler_process() is left for jobs that make use of the API via <script/>
    • An executable file has been terminated that was started via <process/>

    If JobScheduler is killed while an order is processed then the order with it's current state, i.e. the input level of the current job node, will be restored from the database on the next start of the JobScheduler.

  2. Persistence of Enqueued Jobs

    This is handled in the following way:

    • Tasks that are running and are killed due to killing JobScheduler main task are not restarted on scheduler startup (as JobScheduler cannot decide if it's decent to re-execute this job regarding run times and corresponding begin and end time slots etc.).
    • Should a task be enqueued for a future date, e.g. with <start_job job="..." at="now+3600"/><params/></start_job> or the respective API methods then this task's start time is reflected in the database (in the table SCHEDULER_TASKS). For orders and jobs JobScheduler will read the respective tables on startup and enqueue the respective orders and task to the given start time.