Skip to main content
1-Visitor
August 6, 2019
Solved

CRON String Format

  • August 6, 2019
  • 2 replies
  • 3700 views

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

    Best answer by 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 "

     

    2 replies

    19-Tanzanite
    August 6, 2019

    @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

     

    18-Opal
    August 6, 2019

    Hello,

     

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

     

    Regards,
    Constantine

    18-Opal
    August 6, 2019

    @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

    effpt31-VisitorAuthor
    1-Visitor
    August 7, 2019

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