Cron Jobs

Coherence allows you to create and manage cron jobs for your services. Cron jobs are scheduled tasks that run at specific times or intervals. You can use cron jobs to automate repetitive tasks, such as backups, data processing, and system maintenance.

For example:

  • You could create a cron job to run a script that backs up your database every night at midnight to ensure your data is backed up regularly and securely.
  • You could define an hourly cron job to clean up log files.

To create a cron job in Coherence, follow these steps:

  1. In your environment homepage, navigate to the Services tab.
  2. If the service for which you want to create a cron job already exists, click on the three-dot menu to the right of the service name and select Edit from the dropdown. Alternatively, click New service to create the service.
  3. After filling in or confirming the required fields for the service, scroll down to the Crons section and click the triangle to the left of the header to expand the section.
  4. Click Add row to create a new cron job.
  5. For each cron job, you must specify a descriptive name for the cron job, the command or script that the cron job should execute, and a schedule according to which it should be executed (in cron syntax).

A cropped screenshot shows two cron jobs in the "Crons" section of a service.

For more information on cron syntax, see the cron expression overview on Wikipedia.