cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

CRON String Format

effpt3
12-Amethyst

CRON String Format

I need to run a service for every 30 minutes from 7 AM to 7 PM daily except sunday. How can I configure my scheduler.

My CRON string is 0 0,30 7-19 * * 2-7, I enabled my scheduler and subscription, still I'm unable to run my service. Please help me out from this. Correct me If my CRON string is wrong

1 ACCEPTED SOLUTION

Accepted Solutions
effpt3
12-Amethyst
(To:effpt3)

I found the issue..

This Should be CRON string:- 0 0/30 * ? * MON-SAT *

Either Day of the month or Day of the week should be "?".

If Day of the month - " * " then Day of the week - " ? "

If Day of the month  - " ? " then Day of the week - " * " / " MON-SAT "

 

View solution in original post

6 REPLIES 6
cmorfin
19-Tanzanite
(To:effpt3)

@effpt3 

 

Maybe the post How to set up and configure Schedulers can help here.

It seems that the day of week are not taking numbers but string, so in your case it might be MON-SAT.

 

Hope this helps

Kind regards

Christophe

 

Hello,

 

Here are some additional details, might be helpful as well: https://www.ptc.com/en/support/article/CS210207

 

Regards,
Constantine

effpt3
12-Amethyst
(To:cmorfin)

ERROR starting: CronExpression '0 0/30 7-19 * * MON-SAT ' is nvalid.

ERROR starting: CronExpression '0 0/30 7-19 * * 2-7' is invalid.


This is the error in my application log. 

effpt3
12-Amethyst
(To:effpt3)

I found the issue..

This Should be CRON string:- 0 0/30 * ? * MON-SAT *

Either Day of the month or Day of the week should be "?".

If Day of the month - " * " then Day of the week - " ? "

If Day of the month  - " ? " then Day of the week - " * " / " MON-SAT "

 

@effpt3 What exactly do you mean when you say "unable to run my service"? It's never triggered, or triggered at the wrong time? Did you configure correct user to run this service? Can you run it without scheduler under this user? Do you see any errors in logs? Etc.

 

Finally, keep in mind that 7AM and 7PM are in the server timezone.

 

/ Constantine

effpt3
12-Amethyst
(To:Constantine)

My Service is never triggered.I have configured coorect user and there are no error logs.

Top Tags