Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliveNotifier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kpetersn
aliveNotifier
Commits
df044f4a
Commit
df044f4a
authored
7 years ago
by
kpetersn
Browse files
Options
Downloads
Patches
Plain Diff
Added cron.sh script.
parent
fc15de77
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
an.py
+4
-3
4 additions, 3 deletions
an.py
cron
+1
-1
1 addition, 1 deletion
cron
cron.sh
+17
-0
17 additions, 0 deletions
cron.sh
with
22 additions
and
4 deletions
an.py
+
4
−
3
View file @
df044f4a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
cron
+
1
−
1
View file @
df044f4a
*/1 * * * *
/APSshare/anaconda/x86_64/bin/python
/home/KPETERSN/Development/aliveNotifier/
an.py > /dev/null 2>&1
*/1 * * * * /home/KPETERSN/Development/aliveNotifier/
cron.sh
This diff is collapsed.
Click to expand it.
cron.sh
0 → 100755
+
17
−
0
View file @
df044f4a
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment