0

OS: Ubuntu 14.04

I would like to run a PHP script /home/app/myapp.php at minute 37 every two hours between 5AM and 7PM GMT Monday through Friday year round.

What is the crontab file syntax for that?

1
  • I don't see what's non-standard about it.
    – muru
    Jan 31, 2015 at 0:27

1 Answer 1

2
37 5-19/2 * * 1-5

Since, quoting the manpage:

  field          allowed values
  -----          --------------
  ...
  day of week    0-7 (0 or 7 is Sun, or use names)

Ranges of numbers are allowed.  Ranges are two numbers separated with a hyphen.    
...    
Step  values  can be used in conjunction with ranges.  Following a range with ``/<number>'' specifies skips of the number's value through the range.

Names can also be used for the ``month'' and ``day of week'' fields.  ...  Ranges or lists of names are not allowed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .