05-15-2002
Quote:
Originally posted by usfrog
Hi Jacob,
Try something like:
numberOfProcesses=`ps -ef|grep myProcessName|grep -v grep|wc -l`
if [ $numberOfProcesses = 0 ]
then
( echo "From: missingProcesses@yourHostName"
echo "To: yourAddress@wherever.com"
echo "Subject: myProcessName is not running"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "The process is not running"
echo " "
) | /usr/lib/sendmail -i -t
fi
And schedule that little script as a cron.
Hope this helps
thanks buddy,
that sure is a good pointer in the right direction. i will modify it a bit because our admin doesn't give us cron rights on our system !!!
thanks again
jacob
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
I have been a member for almost a year now. I have always recieved email notifications when I select "subcribe to this thread" at the bottom of posts that I reply to.
However, over the last month or so, I have not been recieving email notification of replys to posts I respond to.
I have... (6 Replies)
Discussion started by: Kelam_Magnus
6 Replies
2. UNIX for Dummies Questions & Answers
Hi.
I want to add email notification so when the my script finishes it sends out an email of the results to our team. If there are errors the subject on the email should say there were errors.
If any having idea/sample scripts pls share with me. (2 Replies)
Discussion started by: redlotus72
2 Replies
3. UNIX for Dummies Questions & Answers
In my last job someone gave me the command to put in my .profile that let me know when a job I had running in the background finished. It was a word about 5 char long. I can't remember it! (4 Replies)
Discussion started by: nkeller
4 Replies
4. Programming
Hi,
I have a requirement.
Scenario:
A parent job invokes a child job and gets killed. The child becomes orphan and gets attached to init. Child job is removed from the pid table as soon as it gets completed.
Requirement is i need the status of the child job even after the parent job is... (7 Replies)
Discussion started by: anjul_thegreat
7 Replies
5. Shell Programming and Scripting
Hey guys
Just need some help with crontab.Iam looking for a script that will alert particular user about its change through sendmail.We are using bash here.
--CoolKid (3 Replies)
Discussion started by: coolkid
3 Replies
6. Solaris
I would like to setup a Cron job to check weather X process is running or not. if it is not running then start that X process with a log message....
can any one help writing a script?
thanks (3 Replies)
Discussion started by: chandravadrevu
3 Replies
7. AIX
Hi,
I'm fairly new to Aix and am looking for some help on the following.
I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies
8. Shell Programming and Scripting
Hello everyone,
I have a server in another country, so I would like to run a notification sound, that I can hear in my computer after a job is finished, I found so many commands, like:
COMMAND HERE
spd-say 'Done'
But I cannot hear any sound, the command line does NOT return any error,... (6 Replies)
Discussion started by: Abu Rayane
6 Replies
9. Shell Programming and Scripting
Hi All,
I need write a linux script which emails each record to the employee manager email-id which will be specified inside the file.
Each employee can have a different manager too..
file contain 200 to 300 records
Employee ID, Employee Name, Employee Email-ID, Manager, Manager... (4 Replies)
Discussion started by: tradingspecial
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am getting error below when testing email. is there a way I can configure email on Solaris?
SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise
echo "hello" | sendmail -v abcd
WARNING: local host name (-s) is not qualified; see cf/README: WHO AM I?
abcd... Connecting... (1 Reply)
Discussion started by: roshanbi
1 Replies
R2E(1) General Commands Manual R2E(1)
NAME
r2e - receive RSS feeds by email
SYNOPSIS
r2e [-d dir] action [options]
DESCRIPTION
r2e is a simple program which you can run in your crontab. It watches RSS feeds and sends you nicely formatted email message for each new
item.
The program is configured by ~/.rss2email/config.py by default. To use a different config file in a different directory, you can specify
the -d option before any actions.
For a quick start with r2e, try these steps:
r2e new your@address
r2e add http://feed.url/somewhere.rss
r2e run
The last command should eventually be put into your crontab, if you
want things be sent you automatically.
It is possible to use authenticated feeds using the following syntax:
r2e add http://user:password@example.com/feed
ACTIONS
new [youremail]
Create a new feedfile. If the second option is specified, it sets the default email address that mails are sent to.
add url [youremail]
Subscribe to a feed. The first option is the URL of the feed. The optional second option is the email address to send new items to.
Repeat for each feed you want to subscribe to.
run [--no-send] [num]
Scan the feeds and send emails for new items. This can be run in a cron job.
The --no-send option stops r2e from sending any email. This can be useful the first time you run it, as otherwise it would send every
available story.
If a number is specified, r2e will only download that feed. The list command lists the feed numbers.
email yournewemail
Change the default email address.
list List all your currently subscribed feeds.
delete n
Delete a feed, using its number from the list command.
pause n
Temporarily ignore a feed. A paused feed won't be updated at all.
unpause n
Re-enable updates from a feed.
opmlimport url
Import feeds from an OPML file.
opmlexport
Export feeds to standard output, as an OPML file.
CONFIGURATION
The program's behavior can be controlled via the ~/.rss2email/config.py config file. The file is a python file, so variables are set using
a syntax like this: VARIABLE = "value"
If the value is a number, the quotes may be omitted. Most configuration variables in the file are boolean values, where a 1 indicates the
option is set, and a 0 disables it.
See the example config.py file for a full list of available configuration variables.
FILES
~/.rss2email/feeds.dat
The database of feeds. Use r2e to add, remove, or modify feeds, do not edit it directly.
~/.rss2email/config.py
If this file exists, it it read to configure the program.
AUTHOR
Aaron Swartz <rss2email@aaronsw.com>
R2E(1)