What do slashes "/" mean in crontab?

6,331

Depends on where the slashes are at.

The first occurrence is */10 which means every 10 and since it's the minutes column, every 10 minutes. It's shorthand for 0,10,20,30,40,50 in the minutes column.

The second through fourth, if you have to ask on those, hmmm... It's a path to the executable.

Share:
6,331

Related videos on Youtube

user893730
Author by

user893730

Updated on September 18, 2022

Comments

  • user893730
    user893730 over 1 year

    I'm seeing slashes in some crontab examples, I don't understand what they mean?

    Check this one out for example

    */10 * * * * /home/ramesh/check-disk-space
    

    http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/

  • LawrenceC
    LawrenceC about 12 years
    It's implied in the question that the user knows what cron is for so I think attempting to draw paralells between it and Scheduled Tasks, while true, is only confusing.
  • user893730
    user893730 about 12 years
    Here is another one I found runs on every 23 minutes past midnight every two hours "23 0-32/2 * * * /myscript" is this consistent with what you said?
  • Fiasco Labs
    Fiasco Labs about 12 years
    In cron shorthand, the syntax is firstnum-lastnum/interval, with * standing for all available, ie in the minutes column * would equal 0-59. In the hours column, * would equal 0-23, I think the 32 is transposed. For the hours column, 0-23/2 should be the equivalent of */2. So if you wanted to fire something every two hours starting at 6 am and ending at 6 pm, you'd do something like 6-18/2