Managing jobs

Start / Stop jobs

4 mins

When you finish creating a job, you must “start” the job to enqueue it in the Hangfire scheduler.

Select the job you want to start. All new jobs will be listed with the New Jobs section of the uCronos tree.

Click the [Start job] button at the bottom of the screen. uCronos will attempt to start the job in the scheduler. Once the job has been accepted the job will be moved from New Jobs section to section appropriate for the job.

If the job was of type "Immediate" or "Delayed" they will be moved to the Stopped Jobs section. These job only fire once so they are immediately started, enqueued into the scheduler and then stopped again.

However, "Recurring" jobs will be enqueued into the scheduler and then moved to the Running Jobs section. These job restart themselves at the completion of the recurrence period.

All recurring jobs will be shown within the Running Jobs section of uCronos. Each job shown will have a corresponding recurring job in Hangfire. You can view the status of the Hangfire job using the dashboard tool. This is accessed by clicking any root uCronos tree link or clicking the uCronos link at the top of the page under the search bar.

Stopping recurring jobs

You can stop a recurring job from firing at any time by clicking the [Stop job] button. This will attempt to remove the recurring job from Hangfire and stop the job. If successful it will move the job into the Stopped Jobs section.

Note: Stopped jobs cannot be re-started, however you are able to take a copy of a job together with its properties and start an new job.

Copying a job

You cannot re-start an existing job but you can create a new job and copy its properties. This is only available when a job has been stopped. When you use this feature, the job type will be copied over as well.

Job Errors

Occasionally a job will fail. This failure will not be reported to uCronos. If you suspect a job has failed you should consult the Hangfire dashboard tool to see if any Retries are scheduled. Jobs that fail are automatically scheduled to be run again (retried). If a job continually fails there may be a problem with the action you have defined or an associated configuration setting is wrong. To avoid Hangfire constantly retrying your job, you should thoroughly test your Action (Email or Custom Method) prior to creating your recurring job.

Removing a job

You can remove a job from uCronos by right clicking on the job, and selecting Delete. The Delete dialog will ask you to confirm the deletion.

Please note that deleted jobs cannot be recovered. They are physically removed from the database. Additionally, Hangfire is parsed and any matching Hangfire jobs are removed also.

Last updated on: 16 Feb 2018 03:59 PM