2

I want a cronjob to run at 10:20 and 12:45. Is it possible to set it in one line using cron ?

I know I can add to two similar lines one for 10:20 and another for 12:45.

2 Answers 2

4

No, you can't do this in one line with CRON.

2

The closest you could get with a one-liner is for it to run at

10:20, 10:45, 12:20, 12:45

20,45 10,12 * * * /my/script.sh

Otherwise, make the run run every 5 minutes and add the logic to your script to only execute at those given times.

*/5 * * * * /my/script.sh

You must log in to answer this question.

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