Page MenuHomePhabricator

wikiloves - Incorrect usage of crontab in Toolforge
Closed, ResolvedPublic

Description

https://wikitech.wikimedia.org/wiki/Help:Toolforge/Grid#Creating_a_crontab

JSUB_PARAMS="-mem 1000m -once -j y"
CRONTAB_LOG_FILE="/data/project/wikiloves/logs/crontab.log"
UPDATE_LOG_FILE="/data/project/wikiloves/logs/update-database.log"
UPDATE_SCRIPT="/data/project/wikiloves/wikiloves/bin/update_database.sh"
#Ansible: Nightly update
56 0 * * * jsub $JSUB_PARAMS -o $UPDATE_LOG_FILE -N update_database_high $UPDATE_SCRIPT >> $CRONTAB_LOG_FILE
#Ansible: High-frequency update for the current competition
*/15 * * * * jsub $JSUB_PARAMS -o $UPDATE_LOG_FILE -N update_database_low $UPDATE_SCRIPT africa2019 >> $CRONTAB_LOG_FILE

Please update the Ansible automation to either use crontab directly (and let the shell find the correct binary) or specify /usr/bin/oge-crontab

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Mentioned in SAL (#wikimedia-cloud) [2019-02-25T12:19:56Z] <gtirloni> deleted local crontab on tools-bastion-03 (T217019)

JeanFred claimed this task.
JeanFred added subscribers: Bstorm, JeanFred.

(Sorry, only noticing this now − @Bstorm also contacted me by email regarding this)

I’m using locally a fork of the Ansible modules in order to use /usr/local/bin/crontab (also filed upstream at https://github.com/ansible/ansible/pull/59765)

I believe the crons are now going to the correct place ; please reopen if that’s mistaken :)