Sysadmin papilusion wikizamcron 12 06 2012 - Seizam/seizamcore GitHub Wiki
- user : root
- host : papilusion.reverse.seizam.com
- date : 06/12/12 16:38
- curpath : /home/yannouk
- Edit /etc/crontab, see [1]
[email protected]# cd /var/seizam [email protected]# chgrp -R www-data w/ [email protected]# chmod -R 750 w/ [email protected]# echo "START LOG"> /var/log/wikizam-cron
- Now cron should execute properly, you can check it:
[email protected]# tail -f /var/log/wikizam-cron
[2012-06-12 16:00:01: Searching subscriptions to renew...] [2012-06-12 16:00:01: Updating usages...] [2012-06-12 16:00:01: 0 subscription(s) to renew] [2012-06-12 16:00:01: Deactivating all remaining outdated subscriptions...] OK: 0 record(s) updated [2012-06-12 16:00:01: Archiving and resetting monthly usages...] OK, 0 subscription(s) deactivated [2012-06-12 16:00:01: END] OK: 0 record(s) archived and reset [2012-06-12 16:00:01: END]
[1]\* Edit /etc/crontab
--- old 2012-06-12 16:41:34.000000000 +0200 +++ new 2012-06-12 16:42:27.000000000 +0200 @@ -18 +18,10 @@ */1 * * * * root /usr/local/rtm/bin/rtm 50 > /dev/null 2> /dev/null + +# each 2 hours at x.00 +0 */2 * * * root ( test -x /var/seizam/w/extensions/Wikiplaces/updateSubscriptions.php && cd /var/seizam/w/ && ( php /var/seizam/w/extensions/Wikiplaces/updateSubscriptions.php >> /var/log/wikizam-cron ) && ( echo "updateSubscriptions.php has run" | mail -s "Wikizam cron" root ) ) || ( echo "updateSubscriptions.php cannot be located" | mail -s "Wikizam cron" root ) + +# each hours at x.00 +0 * * * * root ( test -x /var/seizam/w/extensions/Wikiplaces/checkNextRenewals.php && cd /var/seizam/w/ && ( php /var/seizam/w/extensions/Wikiplaces/checkNextRenewals.php --deadline=7 >> /var/log/wikizam-cron ) && ( echo "checkNextRenewals.php has run" | mail -s "Wikizam cron" root ) ) || ( echo "checkNextRenewals.php cannot be located" | mail -s "Wikizam cron" root ) + +# each 20 minutes +*/20 * * * * root ( test -x /var/seizam/w/extensions/Wikiplaces/updateUsages.php && cd /var/seizam/w/ && ( php /var/seizam/w/extensions/Wikiplaces/updateUsages.php >> /var/log/wikizam-cron ) ) || ( echo "updateUsages.php cannot be located" | mail -s "Wikizam cron" root ) +