Sysadmin papilusion ntpdate cron 18 06 2012 - Seizam/seizamcore GitHub Wiki
- user : root
- host : papilusion.reverse.seizam.com
- date : 06/18/12 12:30
- curpath : /home/yannouk
[email protected]# dpkg-reconfigure tzdata
Current default time zone: 'Etc/UTC' Local time is now: Mon Jun 18 10:32:37 UTC 2012. Universal Time is now: Mon Jun 18 10:32:37 UTC 2012.
- Server rebooted to ensure modification applied widely
[email protected]# apt-get update [email protected]# apt-get install ntpdate [email protected]# cat /etc/default/ntpdate
- ntpdate already installed and configured by ovh
[email protected]# ntpdate-debian
- 18 Jun 10:34:40 ntpdate[29971]: step time server 213.251.128.249 offset -106.251164 sec
- Edit /etc/crontab, see [1]
- Edit /root/exec-php-send-daily-report.sh, see [3]
- Edit /etc/crontab, see [4]
- Edit /root/exec-php-send-report.sh, see [5]
[1]\* Edit /etc/crontab
--- old 2012-06-18 11:46:42.000000000 +0000 +++ new 2012-06-18 11:49:59.000000000 +0000 @@ -19,9 +19,9 @@ -# each 2 hours at x.00 -0 */2 * * * root /root/exec-php-send-daily-report.sh extensions/Wikiplaces/updateSubscriptions.php /var/seizam/w +# each day at 8.00 fr +0 6 * * * root /root/exec-php-send-daily-report.sh extensions/Wikiplaces/updateSubscriptions.php /var/seizam/w -# each hours at x.00 -0 * * * * root /root/exec-php-send-daily-report.sh "extensions/Wikiplaces/checkNextRenewals.php --deadline=7" /var/seizam/w +# each day at 8.30 fr +30 6 * * * root /root/exec-php-send-daily-report.sh "extensions/Wikiplaces/checkNextRenewals.php --deadline=7" /var/seizam/w -# each 2 minutes -*/2 * * * * root /root/exec-php-send-daily-report.sh "extensions/Wikiplaces/updateUsages.php --lifespan=30" /var/seizam/w +# each 5 minutes +*/5 * * * * root /root/exec-php-send-daily-report.sh "extensions/Wikiplaces/updateUsages.php --lifespan=30" /var/seizam/w
[3]\* Edit /root/exec-php-send-daily-report.sh
--- old 2012-06-18 11:57:07.000000000 +0000 +++ new 2012-06-18 11:58:59.000000000 +0000 @@ -11,2 +11,5 @@ +# Mail subject +mail_subject="[Report] [Papilusion]" + @@ -84,3 +87,3 @@ chmod 400 ${previous_report_file} - mail -s "${php_file_name} execution report of ${previous_report_date}" ${mail} < ${previous_report_file}; + mail -s "${mail_subject} ${php_file_name} execution report of ${previous_report_date}" ${mail} < ${previous_report_file}; fi
[4]\* Edit /etc/crontab
--- old 2012-06-18 11:59:17.000000000 +0000 +++ new 2012-06-18 12:04:35.000000000 +0000 @@ -27 +27,4 @@ */5 * * * * root /root/exec-php-send-daily-report.sh "extensions/Wikiplaces/updateUsages.php --lifespan=30" /var/seizam/w + +# each day at 7.30 fr +30 5 * * * root ntpdate-debian >> /var/log/ntpdate-debian-cron.log
[5]\* Edit /root/exec-php-send-report.sh
--- old 2012-06-18 12:43:27.000000000 +0000 +++ new 2012-06-18 12:43:52.000000000 +0000 @@ -12,2 +12,5 @@ +# Mail subject +mail_subject="[Report] [Papilusion]" + @@ -107,2 +110,2 @@ chmod 400 ${report_file} -mail -s "${php_file_name} execution report of ${report_date}" ${mail} < ${report_file}; +mail -s "${mail_subject} ${php_file_name} execution report of ${report_date}" ${mail} < ${report_file};