Friday, 25 November 2016

How to execute a Cron job every 5 minutes ?


Execute a Cron job every 5 minutes
  • Cron syntax [minute 0-59 | */n] [hour 0-23 | */n] [day 1-31] [month 1-12] [DoW 0-6]
  • The first field is for minutes.
    • If you specify * in this field, it runs every minutes.
    • If you specify */5 in the 1st field, it runs every 5 minutes 
      • In the same way, use */10 for every 10 minutes
      • */15 for every 15 minutes
      • */30 for every 30 minutes
*/5 * * * * /home/script/myscript.sh

No comments:

Post a Comment

Note: only a member of this blog may post a comment.