FreeBSD 仮想環境 cron

The periodic daily and periodic weekly jobs in /etc/crontab run find(1) for a couple of things. Part of the daily job is /etc/periodic/security/100.chksetuid and /etc/periodic/security/110.neggrpperm. One or both of those is fairly disk intensive. The weekly job rebuilds the locate(1) database, trying to catalog every file.

Might be easiest to set the daily and weekly execution times ten or twenty minutes later for each VM. Depending on the VMs, some of those jobs might be unnecessary and could be disabled in periodic.conf(5).

https://forums.freebsd.org/threads/47353/

http://qiita.com/ohtsuka1317/items/b89ea66f3d227c172477

anacron の RANDOM_DELAY みたいなことをやりたい

シェルスクリプト ランダム値を得る

bash zsh

What if you add sleep $[ ( $RANDOM % 60 ) + 1 ]s? This way, you sleep a random number of seconds and after that perform the command:

 * * * * * sleep $[ ( $RANDOM % 10 ) + 1 ]s && wget http://link.php

crontab - How to give a random delay on Cron Jobs commands - Stack Overflow

1) On BSD systems, you can use jot(1):

sleep `jot -r 1 1 900`

dannyman.toldme.com : HOWTO: Random Number in Shell Script

jotコマンドについて調べてみた - くんすとの備忘録

2700 45分

# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    sleep `jot -r 1 0 2700`; periodic daily