Skip to content
Snippets Groups Projects
Commit df044f4a authored by kpetersn's avatar kpetersn
Browse files

Added cron.sh script.

parent fc15de77
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,8 @@ def notifyGnome3(ioc, state, time_str):
#!if state == "DOWN":
#! priority = 2
notify_command = "./gnome3-notify.py \'%s\' \'%s\' %i \'%s\'" % (subject, message, priority, url)
# gnome3-notify.py must be on the PATH
notify_command = "gnome3-notify.py \'%s\' \'%s\' %i \'%s\'" % (subject, message, priority, url)
#!print notify_command
os.system(notify_command)
......@@ -62,8 +63,8 @@ def notifyCombo(ioc, state, time_str):
# set notification function
#!notify = notifyConsole
#!notify = notifyEmail
notify = notifyGnome3
notify = notifyEmail
#!notify = notifyGnome3
#!notify = notifyOSX
#!notify = notifyCombo
......
*/1 * * * * /APSshare/anaconda/x86_64/bin/python /home/KPETERSN/Development/aliveNotifier/an.py > /dev/null 2>&1
*/1 * * * * /home/KPETERSN/Development/aliveNotifier/cron.sh
cron.sh 0 → 100755
#!/bin/bash
# Path to this script
SNAME=$0
#!echo $SNAME
DIRNAME=dirname
#!DIRNAME=/usr/bin/dirname
# Get the script dir, which is not necessarily the same as the pwd
SDIR=$(${DIRNAME} ${SNAME})
#!echo $SDIR
# Add the script dir so that gnome3-notify.py is found
export PATH=${PATH}:${SDIR}
/APSshare/anaconda/x86_64/bin/python an.py > /dev/null 2>&1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment