• How to make the length of CRON-assignment less than 1 minute?

    • views 1159

    Developer said that this is impossible. Maybe you have some ideas?

    Solutions (1)
    Good afternoon, if you need to run the task twice a minute: Create one task in the crown with the start interval per 1 minute and prescribe the command or file that needs to be run. Create a file, put the rights to run on it. In the first line of the file, write sleep 30. In the second line, write the command or file that you need to run. Create a task in the crown to run this file once a minute. Similarly, you can run the task as many times per minute as you want. Before doing this, we recommend you think about if its really necessary to perform the task more than once a minute.
    Answers (2)

    Using the built-in tools of the operating system, it is usually impossible to run the cron-task more often than once a minute

    In most cases, there is no need to run any script so often. And also if your script is resource intensive, so frequent start of the script can cause excessive load on your server.

    Anyway, you can try  to use such cases:

    */1 * * * * root /home/mybin/script.sh; /bin/sleep 15; /home/mybin/script.sh; /bin/sleep 15; /home/mybin/script.sh; /bin/sleep 15; /home/mybin/script.sh

    */15 * * * * root /home/mybin/script.sh;

    Thats impossible by using cron. You need other software for this or write an automation script.
We do our best for you!
Rate the article
Tell the world about it

Users (0) 0 of 5

  • In order to provide you with the best online experience this website uses personal data (cookies, IP, email, photo, name, website, etc). By using our website, you agree to our use of your personal data. More info we get commissions from the hostings, but our ratings are honest and the reviews are real.
  • Important

    We are in BETA. We need your help!

    Anonymous reviews are not allowed!

    Every month we add $50 to the account of a randomly selected user.*

    In addition, you will receive a free permanent link to your site after you leave an honest review!