diff --git a/canto_weekly_export.service b/canto_weekly_export.service new file mode 100644 index 0000000000000000000000000000000000000000..89cca46b263e1b2881fcf335dd643a05a190838d --- /dev/null +++ b/canto_weekly_export.service @@ -0,0 +1,11 @@ +[Unit] +Description=Runs Canto weekly_export.sh script +After=network-online.target +Wants=network-online.target + +[Service] +WorkingDirectory=/data/export/canto-space/canto +ExecStart=/data/export/canto-space/weekly_export.sh + +[Install] +WantedBy=default.target \ No newline at end of file diff --git a/canto_weekly_export.timer b/canto_weekly_export.timer new file mode 100644 index 0000000000000000000000000000000000000000..0d50ab7dcae68e8adfb1497cc202e4784aa5c8dc --- /dev/null +++ b/canto_weekly_export.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Run canto_weekly.service on Weds at 12pm. + +[Timer] +OnCalendar=Weds 12:00:00 + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/usage_notes.txt b/usage_notes.txt new file mode 100644 index 0000000000000000000000000000000000000000..91ca3f7222df58163f8c5f63f8ead2b2e9792282 --- /dev/null +++ b/usage_notes.txt @@ -0,0 +1,11 @@ +List all timers +# systemctl list-timers --all + +Should see output like +# root@flybase-vm:/data/export/canto-space/logs# systemctl list-timers --all +NEXT LEFT LAST PASSED UNIT ACTIVATES +Mon 2020-12-07 01:00:00 GMT 5 days left Mon 2020-11-30 01:00:35 GMT 1 day 10h ago canto_weekly.timer canto_weekly.service + +Basic consistency check of script (no output is good) +# bash -n weekly_routine.sh +