What is a cron schedule?

A cron schedule is a time-based job scheduler in Unix-like operating systems that allows users to run scripts or commands at specified intervals. It uses a configuration file called a "crontab" to define the timing and frequency of these jobs.

The cron schedule format consists of five fields followed by the command to be executed:

* * * * * command_to_execute

Each field represents:

  1. Minute (0-59)
  2. Hour (0-23)
  3. Day of the month (1-31)
  4. Month (1-12)
  5. Day of the week (0-7) (Sunday is both 0 and 7)

For example, to run a script every day at 5 PM, you would write:

0 17 * * * /path/to/script.sh

This means the script will execute when the minute is 0 and the hour is 17 (5 PM) every day.

0 Comments

no data
Be the first to share your comment!