Merge cron into scripts folder

This commit is contained in:
Luke Murphy 2020-02-11 15:32:40 +01:00
parent 3afb89b1bb
commit 6b954e98f9
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 6 additions and 9 deletions

4
bin/voicegardens-cron-daily Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
/var/www/doesitsparkjoy.voicegardens.org/bin/clear-archives | tee -a /var/log/voicegardens.org.log
/var/www/doesitsparkjoy.voicegardens.org/bin/copy-fixed-archive | tee -a /var/log/voicegardens.org.log

View File

@ -1,7 +0,0 @@
SHELL=/bin/bash
# every morning at 09:00, clear the archives
0 9 * * * /var/www/doesitsparkjoy.voicegardens.org/bin/clear-archives | tee -a /var/log/voicegardens.org.log
# every morning at 09:01, copy over the fixed archive
1 9 * * * /var/www/doesitsparkjoy.voicegardens.org/bin/copy-fixed-archive | tee -a /var/log/voicegardens.org.log

4
fabfile.py vendored
View File

@ -31,9 +31,9 @@ def dailycron(c):
"""Copy new crontab.""" """Copy new crontab."""
print('Copy over new crontab ...') print('Copy over new crontab ...')
# See https://github.com/fabric/fabric/issues/1750 # See https://github.com/fabric/fabric/issues/1750
c.put('./cron/voicegardens', remote='./') c.put('./bin/voicegardens-cron-daily', remote='./')
c.sudo('mv voicegardens /etc/cron.daily') c.sudo('mv voicegardens /etc/cron.daily')
c.sudo('chown root:root /etc/cron.daily/voicegardens') c.sudo('chown root:root /etc/cron.daily/voicegardens-cron-daily')
print('New cron in place <3') print('New cron in place <3')
@task @task