We have a cron job for the automatic banner update on wikipedia.de that pulls the newest version of the wikipedia.de-banners repository once a minute, to pull the latest banners and campaign data. After a previous cron job definition did not work, Gabriel created a bash script in /home/deploy/bin/update_banners.sh that runs the tasks and writes a log file. But that script is written "in production" and should be formalized and improved upon in the infrastructure repo:
- Install the script via Ansible (with the right permissions)
- Change the deploy user crontab to use that script
- Add a MAILTO=fundraising-tech@wikimedia.de to the deploy user crontab (see other crontabs in the playbooks on how to do it)
- Add a logrotate configuration that purges/compresses the log file /home/deploy/fetch-banners.log every day and keeps a history of 7 days.