From 19e60e5669aff7785897b5c9a0fa240b734b241d Mon Sep 17 00:00:00 2001 From: FoAM Date: Sun, 29 Apr 2018 10:16:28 +0000 Subject: [PATCH] crontabulation --- .gitignore | 1 + crontab.txt | 33 +++++++++++++++++++++++++++++++++ evening.sh | 5 +++++ morning.sh | 5 +++++ 4 files changed, 44 insertions(+) create mode 100644 .gitignore create mode 100644 crontab.txt create mode 100644 evening.sh create mode 100644 morning.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/crontab.txt b/crontab.txt new file mode 100644 index 0000000..9e90deb --- /dev/null +++ b/crontab.txt @@ -0,0 +1,33 @@ +# Edit this file to introduce tasks to be run by cron. +# +# Each task to run has to be defined through a single line +# indicating with different fields when the task will be run +# and what command to run for the task +# +# To define the time you can provide concrete values for +# minute (m), hour (h), day of month (dom), month (mon), +# and day of week (dow) or use '*' in these fields (for 'any').# +# Notice that tasks will be started based on the cron's system +# daemon's notion of time and timezones. +# +# Output of the crontab jobs (including errors) is sent through +# email to the user the crontab file belongs to (unless redirected). +# +# For example, you can run a backup of all your user accounts +# at 5 a.m every week with: +# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ +# +# For more information see the manual pages of crontab(5) and cron(8) +# +# m h dom mon dow command + +# in foam's crontab. check timezone and clock sync + +# */5 * * * * /home/foam/ephemeral-garden/check.sh >> /home/foam/ephemeral-garden/test.log 2>&1 +* 07 * * * /home/foam/ephemeral-garden/morning.sh >> /home/foam/ephemeral-garden/test.log 2>&1 +* 22 * * * /home/foam/ephemeral-garden/evening.sh >> /home/foam/ephemeral-garden/test.log 2>&1 + +# in root's crontab. check timing +# 0 4 * * * /sbin/shutdown -r now + + diff --git a/evening.sh b/evening.sh new file mode 100644 index 0000000..5cd4a75 --- /dev/null +++ b/evening.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# evening. clean up and stop processes + +echo "evening: `date`" diff --git a/morning.sh b/morning.sh new file mode 100644 index 0000000..acda7b4 --- /dev/null +++ b/morning.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# morning. set up and start processes + +echo "morning: `date`"