G22 0 Posted August 26, 2005 How do I specify every 30 seconds? I ferget how to do this. I have every 1 minute currently. Thx. */1 * * * * Share this post Link to post Share on other sites
steve~ 0 Posted August 29, 2005 I think you can only specify up to the minute in crontab, but instead of calling your program directly in crontab, you could have it call a script that does something like: your_program sleep 30 your_program Or instead of using crontab you could have a script like this running constantly: while true do your_program sleep 30 done Share this post Link to post Share on other sites
cctvfan 0 Posted August 29, 2005 Steve solutions work. He's probably assuming your_program will spawn itself and returns right away; alternatively the script can put it in background (with your_program &). Otherwise the "duty cycle" may not be 30s, but something else, e.g. 38s if your_program takes 8s to complete. Share this post Link to post Share on other sites
Thomas 0 Posted August 29, 2005 0/1 * * * * /scripts/foo.sh 0/1 * * * * sleep 30 /scripts/foo.sh You can also call to a sleep script, but I seem to recall using the sleep command directly in crontab. Share this post Link to post Share on other sites
G22 0 Posted August 29, 2005 Thx. It is really quite sad what I have to do (but it works)... log into our Cisco router (currently every minute) and flush the Dynamic NAT table since the router crashes almost immediately if I do not. Even at 1 minute currently, the router sometimes crashes between the minutes. It is a temp fix until we get a better router and latest IOS. Share this post Link to post Share on other sites