4 ms·
I am ignorant on specific time requirements on running crontabs but I always do either 6min or 10min or something which is divisible. Are there any specific ap
by SriniK 16y ago
I am ignorant on specific time requirements on running crontabs but I always do either 6min or 10min or something which is divisible.
Are there any specific app requirements in running 7min or 17sec?
- dfox 16y agoAnother problem with 17 seconds is that normal cron has resolution of one minute :)
- mike-cardwell 16y agoscreen -dmS 17secondjob perl -e 'while(1){`run the command`;sleep 17}'
- xyzzyz 16y agoThis will not run the `command` in 17 seconds intervals. You need to take into account the amount of time that it takes to run it.
- mike-cardwell 16y agoOk. Whilst we're being anal: screen -dmS 17secondjob perl -Mthreads -e 'while(1){threads->create(sub{`run the command`})->detach();sleep 17}'
- eru 16y agoOr just use watch.
- mike-cardwell 16y agoCool. I was unfamiliar with this command. Looks useful.
- eru 16y agoLook for `watch -p'.
- moeffju 16y agoOr, simpler, use watch: watch -n 17 -p command Make a wrapper to run command in the background (&) if the process runtime is greater than your interval.