0
votes

I want schedule the cron job on every Monday and Thursday at 1.00 AM. I have used below command but I am getting an error.

0 1 * * Mon,Thu /home/abc/xyz.ksh

crontab: error on previous line; unexpected character found in line. crontab: errors detected in input, no crontab file generated.

Can anyone advise me how to set it up?

2
What does the entire crontab look like? What line does it complain about?Dark Falcon
@DarkFalcon:- There is only one line in crontab. I mentioned it above.Vicky

2 Answers

2
votes

Please try this instead:

0 1 * * 1,2 /home/abc/xyz.ksh >/dev/null 2>&1

Regards

1
votes
0 1 * * 1,4 /home/abc/xyz.ksh >/dev/null 2>&1

Where 1 and 4 translates to Monday and Thursday respectively. Valid range is 0 to 6 with 0 being Sunday and 6 representing Saturday