2015-10-16

[SOLVED]Linux schedule 5s

#11:27 13/07/2015
#crontab -e
#Running per 1 mins:
* * * * *  /opt/script/dostuff.sh




#Running per 5s:
root@localhost /opt/script# cat /opt/script/dostuff.sh
#dostuff.sh
(sleep 5 && /opt/script/process-kill-url) &
(sleep 10 && /opt/script/process-kill-url) &
(sleep 15 && /opt/script/process-kill-url) &
(sleep 20 && /opt/script/process-kill-url) &
(sleep 25 && /opt/script/process-kill-url) &
(sleep 30 && /opt/script/process-kill-url) &
(sleep 35 && /opt/script/process-kill-url) &
(sleep 40 && /opt/script/process-kill-url) &
(sleep 45 && /opt/script/process-kill-url) &
(sleep 50 && /opt/script/process-kill-url) &
(sleep 55 && /opt/script/process-kill-url) &
(sleep 60 && /opt/script/process-kill-url) &


No comments:

Post a Comment