What are common cron schedule examples?

Here are some common cron schedule examples:

  1. Every minute:

    * * * * * command_to_execute
  2. Every hour:

    0 * * * * command_to_execute
  3. Every day at midnight:

    0 0 * * * command_to_execute
  4. Every day at 5 PM:

    0 17 * * * command_to_execute
  5. Every Sunday at 3 AM:

    0 3 * * 0 command_to_execute
  6. On the first day of every month at 6 AM:

    0 6 1 * * command_to_execute
  7. Every weekday (Monday to Friday) at 9 AM:

    0 9 * * 1-5 command_to_execute
  8. Every 15 minutes:

    */15 * * * * command_to_execute
  9. At 10 PM on the last day of every month:

    0 22 L * * command_to_execute
  10. At 5 AM on the 1st and 15th of every month:

    0 5 1,15 * * command_to_execute

These examples can be adjusted based on your specific needs by changing the command and the timing fields.

0 Comments

no data
Be the first to share your comment!