How to set up a task to be executed every X minutes on a Plesk server?

Follow

Comments

4 comments

  • Avatar
    Chad Thornburg

    Hello!  The example provided is not clear and only works because "every 30 minutes" is equivalent to two executions - at :00 and :30 of the hour.  However, if you took this same command and wanted to edit it to every 2 minutes for example, somebody might try to use the cron-style (Windows): 0,2**** , but this is not correct.  This would only run the task at :00 and :02 of the hour.  To run a task every 2 minutes, you would need to use the following cron-style (Windows): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * *

    Can you please review this article and update it if necessary to clarify the correct format for every x minutes?

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Nikita Nikushkin

    Hi @Chad Thornburg,

    Indeed, using the "/" character is not allowed in Windows

    Instead of this, it's required to place a comma-separated list for each execution time

    If you try to use the "/" character, the next error will appear:

    Invalid crontab syntax

    So, your examples are correct and I added them to the article. Thank you!

     

    1
    Comment actions Permalink
  • Avatar
    Pete Batin

    This was such a poorly thought out feature to implement and as such a bad one. 

    It's great that Plesk want's to standardise the control panel between platforms but now in the case of Windows servers the experience is worse than before.  Previously there were checkboxes that you could tick, so if you wanted a task to execute every 5 minutes then you could just ticket the appropriate boxes. 

    Now in attempt to bring cron style to Windows without the / character this has become really laborious having to enter 0,5,10,15,20,25,30,35,40,45,50,55 * * * *.  There should have been compensation for the / character in Windows and Plesk should have translated this behind the scenes instead of the user.  Plesk on Windows should detect the / character, work out the increments, produce a comma separated list and use that, the user should be unaware of this.

    So it's cron but not cron and as such Windows servers have a feature that's worse than and not as good as it was before.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Pere

    Thank you for the feedback.

    Feel free to share functionality suggestions at Plesk User Voice portal.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request