User Login





Register
Forget Password

Hostings with very low prices

Hosting Plans Starting at 1$/Month

BaydHost

Powered By

  • AhmBay
  • Run a cron command every 15 minutes - Linux / Unix Webmaster Tips, Knowledge Base Webmaster Tools

    Home > Linux / Unix > Run a cron command every 15 minutes
    Category: Linux / Unix
    Written by: Admin
    Date: 2008-11-16
    Rating: 0   Puan:0 | Katılımcı:0 | Voted : 0 times
    Hit: 40
      

    Cron is a time based scheduling service on Linux and Unix computers which allows you to run process at specific times for example once a day, once every hour and so on. This brief post looks at how to run a cron command every 15 minutes.

    The crontab format is minute - hour - day of month - month - day of week followed by the command to run. Any of these values can be * which matches any value.

    There are two ways to run a cron command every 15 minutes. The first is like this, where each minute is specified:

    0,15,30,45 * * * * /path/to/command

    The above command will run every hour of every day on the hour, and at 15, 30 and 45 minutes past the hour. If you wanted to offset your 15 minute command to run on e.g. the 5th, 20th, 35th and 50th minutes of the hour you could do this instead:

    5,20,35,50 * * * * /path/to/command

    If you are happy with the command running at 0, 15, 30 and 45 then you can simplify the syntax with the second way of running a cron process every 15 minutes like so:

    */15 * * * * /path/to/command

    This last example is the exact equivilent of the first example but more succinct.