Abstract


  • Cron jobs are tasks scheduled to run automatically at specific times or intervals


  • Set cron job with interactive visual

Crontab


  • crontab is used on Unix-like systems to manage Cron Job

Important

Cron jobs are executed under the user profile that sets them.

Tool

You can set a cron job using crontab -e and view cron jobs using crontab -l.

Cron Job not triggered?

Make sure always specify the absolute path of the command. Cron job has a limited PATH environment variable.

Cronitor

  • By default, we aren’t alerted when a Crontab fails. We can use a 3rd party tools like Cronitor to get notified via emails when the cron job fails. Cronitor provides great visibility into the cron job by installing an agent alongside the cron job, so we are able to obtain error logs of cron jobs too!
  • You can also look into Healthchecks.io or uptime-kuma if you want a self-hosting option

XXL-Job


  • XXL-Job is a tool for Java applications to run scheduled Cron Job in distributed systems. It comes with a web UI, built-in failover and retry mechanisms, and produces Log and Metric