0
votes

What should be the cron expression to run a job at 6am, 12 noon, 6pm and 12 midnight everyday? I am using the following in AWS Cloudwatch rule. It is not accepting the cron expression - 0 */6 * * * Getting the following message - "Parameter ScheduleExpression is not valid"

1
"not working properly" - what does it do then? How did you test it to (not) work? - domen
FWIW, this appears to be right. You could also use 0,6,12,18 for hours, or just four crontab entries to make it simple and clear. - domen
@domen I am giving the expression in AWS Cloudwatch rule. It is not accepting the cron expression. - TeeKay
That might be a bit relevant. From docs.aws.amazon.com/AmazonCloudWatch/latest/events/… "Cron expressions have six required fields, which are separated by white space." - domen
Wierd, 0 */6 * * * is corerct. I gues you have some kind of environment problems - ilyas Jumadurdyew

1 Answers

0
votes

Used the following cron job - 0 */6 * * ? * Worked perfectly.