Skip to main content
Question

Cron expression - what wrong with this one?

  • September 19, 2023
  • 4 replies
  • 336 views

scarter
Contributor
Forum|alt.badge.img+9

Hi forum,

 

I'm very new to FME Flow. I need to set up a schedule using cron expression for 07:00 Monday to Saturday, all year. I've entered...

 

0 7 * * 1-6

 

However FME Flow gives a message: "Invalid cron expression: 0 7 * * 1-6"

 

I cant see what's wrong with it. Any thoughts?

 

See attached image.

Swk_cronThanks,

Stuart

 

 

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Please see https://community.safe.com/s/article/writing-cron-expressions-to-schedule-fme-server-jo

I think it should be

0 0 7 ? * MON-SAT

 


david_r
Celebrity
  • September 19, 2023

Personally, I always end up using this CRON generator, since I end up forgetting the syntax between uses: https://www.freeformatter.com/cron-expression-generator-quartz.html

Which would give you:

0 0 7 ? * MON,TUE,WED,THU,FRI,SAT *

 


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • September 19, 2023
nielsgerrits wrote:

Please see https://community.safe.com/s/article/writing-cron-expressions-to-schedule-fme-server-jo

I think it should be

0 0 7 ? * MON-SAT

 

Yes, that worked. Thank you.

scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • September 19, 2023
david_r wrote:

Personally, I always end up using this CRON generator, since I end up forgetting the syntax between uses: https://www.freeformatter.com/cron-expression-generator-quartz.html

Which would give you:

0 0 7 ? * MON,TUE,WED,THU,FRI,SAT *

 

Most Google guidance I found suggested five fields:


·         minute of the hour (0-59), or leave as *

·         the hour (0-23), or leave as *

·         day of the month (1-31), or leave as *

·         month (1-12), or leave as *

·         day of the week (0-6 where 0 or 7 is Sunday), or leave as *


Thus my effort of 0 7 * * 1-6



I didn’t realise Flow wanted it’s cron expressions to be a bit more expanded that that.



Thanks,

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings