How to make the length of CRON-assignment less than 1 minute?
- views 1227
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.
Users (0) 0 of 5