Make each overnight script optional
trying to phase out at least 1, maybe 2 of them... this also cleans up the 'restart' script to use 'rattail overnight' per recent changes. this seems the most useful to have around, in case of web app failure
This commit is contained in:
parent
a36ecdb2ad
commit
25891902b8
3 changed files with 41 additions and 34 deletions
|
@ -1,10 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
<%text>############################################################</%text>
|
||||
#
|
||||
# overnight automation (${automation}) via cron
|
||||
#
|
||||
<%text>############################################################</%text>
|
||||
|
||||
|
||||
cd ${envroot}
|
||||
|
||||
|
@ -12,7 +6,8 @@ RATTAIL="bin/rattail --config=app/cron.conf"
|
|||
|
||||
$RATTAIL overnight ${automation.lower()} <%text>\</%text>
|
||||
--no-versioning <%text>\</%text>
|
||||
% if email_key is not Undefined and email_key:
|
||||
--email-key '${email_key}' <%text>\</%text>
|
||||
% endif
|
||||
--no-email-if-empty
|
||||
% if email_key is not Undefined and email_key:
|
||||
--email-key '${email_key}' <%text>\</%text>
|
||||
% endif
|
||||
--no-email-if-empty <%text>\</%text>
|
||||
--wait
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
DATE=`date --date='yesterday' +%Y-%m-%d`
|
||||
cd ${envroot}
|
||||
|
||||
echo "${envroot}/bin/rattail -c ${appdir}/cron.conf --no-versioning run-n-mail ${"--key '{}'".format(email_key) if email_key is not Undefined and email_key else ''} -S 'Overnight catch-up: ${automation}' '${appdir}/overnight-${automation.lower()}.sh $DATE'" | at 'now + 1 minute'
|
||||
RATTAIL="bin/rattail --config=app/cron.conf"
|
||||
|
||||
$RATTAIL overnight ${automation.lower()} <%text>\</%text>
|
||||
--no-versioning <%text>\</%text>
|
||||
% if email_key is not Undefined and email_key:
|
||||
--email-key '${email_key}' <%text>\</%text>
|
||||
% endif
|
||||
--email-if-empty <%text>\</%text>
|
||||
--no-wait
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue