This project has moved. For the latest updates, please go here.

Job Statuses

The original requirement for this service was to always have an up to date view of exactly what the status of a job was. You'll see some of the statuses are so short lived that you're unlikely to see them in practice though.
  • Ready = 0
    • This is your basic status, meaning, when there's space on a queue, let me at it...
  • Queuing = 1
    • This is used internally by the job stores. It's basically there so that the job store can use transactions to "capture" a job in the case where you have the service clustered (more than one instance looking at the same job store)
  • Queued = 2
    • The job is queued in memory by the background service and awaiting an available thread to start executing or awaiting a scheduled trigger.
  • Scheduled = 4
    • The system uses this to signify that jobs have a valid schedule and will wait for the appropriate time before executing the job.
  • Executing = 8
    • Just what it says. I'm busy.
  • Done = 16
    • Executed successfully and returned a "Success" result
  • Pending = 32
    • This is a "placeholder" status that the consumer/creator of a job can use to keep the job in the store, but have the service do nothing with it. By default the UI will create jobs in this status so you have to click run if it's not scheduled.
  • FailRetry = -1
    • Sometimes, you want to know that something failed, but you want the job to be retried at some stage. The service will NOT auto retry this, it's for the consumer to decide to rerun.
  • FailAutoRetry = -2
    • Same as FailRetry, except in this case, the job WILL be re-run as soon as it returns.
  • ShutdownTimeout = -4
    • The job was still executing but the service was shutdown. After the service waited for it's alloted shutdowntimeout, the thread was killed ABNORMALLY.
  • ExecutionTimeout = -8
    • The job had an absolute timeout and it took longer to execute, the thread was killed ABNORMALLY.
  • Fail = -16
    • Ye olde fail status. Your job either threw an exception or returned FAIL as it's result.
  • Deleted = -32
    • This is the status of a job if the the service failed to load the job type. You can also use it for archiving, but rather use the history table for that.
  • Creating Job Entry Typically, when creating a new job entry, you'd leave out the status (or set to Ready).
  • Run Job To run a job now, set status to "Ready".

Last edited May 15, 2012 at 11:17 PM by dawidpotgieter, version 4

Comments

No comments yet.