Glam Prestige Journal

Bright entertainment trends with youth appeal.

There is a way to run cron jobs on different days of the week, for example

0 8,16 * * 1-6

runs a job at 8:00 and 16:00 Monday to Saturday.

What if the job should run on Sunday as well, but only once (say, at 16:00 only)? Of course one can use 2 lines, one for Sunday only and one for Monday to Saturday. But is there a way to say that in a single crontab line?

1

1 Answer

You must add another line in cron like:

0 16 * * 7 /path/to/command

There is no way to do it in one line!

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy