Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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
Solved! Go to Solution.
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 "
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
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.
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
My Service is never triggered.I have configured coorect user and there are no error logs.