e.g.) IO workload
1. Create Job - 1G file create 100ea per every 20 mins / then remove it.
# crontab -u root crontab
# crontab -e
*/20 * * * * for i in {1..100}; do dd if=/dev/zero of=/tmp/dummy1G-$i bs=1 count=0 seek=1G; done
*/20 * * * * rm -f /tmp/dummy1G-*
2. List current cron job
# crontab -l
3. Remove cron job
# crontab -r
4. Repeat per second
* * * * * * <%command%> & sleep 30; <%command%>
5. restart cron daemon
service crond restart
cf.
1 * * * *, not per every minute, it means every hours 1st minute. 1:01, 2:01, ...
* * * * *, execute per every minute.
* 1 * * *, not every hours, it means every days 1 o'clock.
01 * * * *, execute per every hour
참조.
반응형