Browse Source

Merge cron into scripts folder

main
Luke Murphy 4 years ago
parent
commit
6b954e98f9
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 4
      bin/voicegardens-cron-daily
  2. 7
      cron/voicegardens
  3. 4
      fabfile.py

4
bin/voicegardens-cron-daily

@ -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

7
cron/voicegardens

@ -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

@ -31,9 +31,9 @@ def dailycron(c):
"""Copy new crontab."""
print('Copy over new crontab ...')
# 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('chown root:root /etc/cron.daily/voicegardens')
c.sudo('chown root:root /etc/cron.daily/voicegardens-cron-daily')
print('New cron in place <3')
@task

Loading…
Cancel
Save