Update Cron Job so as to run only on weekdays 2.0
Should work I believe as long as hangover.sh is in the users home directory
This commit is contained in:
parent
d956aa1fc6
commit
ac4d41115b
12
hangover.sh
12
hangover.sh
|
|
@ -5,6 +5,18 @@ if who | grep -wq $USER; then
|
|||
exit
|
||||
fi
|
||||
|
||||
# Get user home path and username
|
||||
PATH=~
|
||||
|
||||
# sets hangover.sh write permission
|
||||
chmod +x ~/hangover.sh
|
||||
|
||||
# Checks to see if job is in crontab already and if not updates cronto run the script only on weekdays @ 8:45am
|
||||
if ! crontab -u $USER -l | grep hangover.sh then
|
||||
echo "45 8 * * 1-5 $PATH/hangover.sh" >> newcronjob
|
||||
crontab -e newcronjob
|
||||
fi
|
||||
|
||||
# Phone numbers
|
||||
MY_NUMBER='+xxx'
|
||||
NUMBER_OF_BOSS='+xxx'
|
||||
|
|
|
|||
Loading…
Reference in New Issue