Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Grep the 'not running' jobs and will send the update in mail with its name(job) Post 302968937 by Skrynesaver on Wednesday 16th of March 2016 07:47:20 AM
Old 03-16-2016
Test that mailx works correctly and then

Code:
crontab -e 

00,15,30,45 0 0  0 0 [ -x /a/b/c/script.sh ] && /a/b/c/script.sh | grep not | mailx -s "Expired jobs" learner987@unix.com

This User Gave Thanks to Skrynesaver For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

send mail after script finishes running

Hi All, We now have a Log file which has time stamps of all the scripts ran. It has start time and end time. I now have a requirement to send mail to the Admin after the script finishes running. Can some one help me with a Script which will send mail with Start time and End time of the... (2 Replies)
Discussion started by: srikanthgr1
2 Replies

2. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

3. AIX

Able to send mail without running MTA (sendmail)?

Hi, I am facing a (for me and coworkers) strange behaviour. When I stop sendmail on a plain AIX 5.3 testing box (there is definetly no sendmail process left running anymore), I am still able to send mails to remote addresses via the mail command. I tried that on another box which is not a... (6 Replies)
Discussion started by: zaxxon
6 Replies

4. Shell Programming and Scripting

Calling SQL script from ksh job and send mail on some error.

Hi, I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are: 1) How to call a sql script from ksh job with parameters? 2) How to use the parameter in sql file to... (1 Reply)
Discussion started by: anil029
1 Replies

5. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

6. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

7. Shell Programming and Scripting

Ksh: Send a mail in case grep finds something

I want to search a file if it contains special strings and if yes, the records found should be mailed. I can either do it with a temporary file: /usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@mycomp.com < /tmp/tempfile... or by running the grep... (10 Replies)
Discussion started by: Cochise
10 Replies

8. UNIX Desktop Questions & Answers

Need to send mail only when the job is not running

I have set up a cron, which will send the mail with not runnnig jobs in the script.sh 15,30,45 * * * * /a/b/c/script.sh | grep not | mail -s "test mail" learner987@gmail.com But i dont want mail when all the jobs are running, but with the above cron i will get mails without the content(if all... (2 Replies)
Discussion started by: learner987
2 Replies

9. UNIX for Beginners Questions & Answers

Read a file and send mail based on grep

Hi All, I am having a job and I need to send email when the job is running. On any other case (success,fail) I don't needed to send email. I check with BMC they told they dont have that in the version I am using. So I created a dependent job and grepped for the status and sent email. My... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
CHECK_GEARMAN(8)					  System Administration Utilities					  CHECK_GEARMAN(8)

NAME
check_gearman - Nagios service check to monitor the gearman job server DESCRIPTION
usage: check_gearman [ -H=<hostname>[:port] ] [ -t=<timeout> ] [ -w=<jobs warning level> ] default: 10 [ -c=<jobs critical level> ] default: 100 [ -W=<worker warning level> ] default: 25 [ -C=<worker critical level> ] default: 50 [ -q=<queue> ] to send a test job: [ -u=<unique job id> ] default: check [ -s=<send text> ] [ -e=<expect text> ] [ -a send async ] will ignore -e [ -h print help ] [ -v verbose output ] [ -V print version ] - You may set thresholds to 0 to disable them. - Thresholds are only for server checks, worker checks are availability only perfdata format when checking job server: |'queue waiting'=current waiting jobs;warn;crit;0 'queue running'=current running jobs 'queue worker'=current num worker;warn;crit;0 Note: set your pnp RRD_STORAGE_TYPE to MULTIPLE to support changeing numbers of queues. see http://docs.pnp4nagios.org/de/pnp-0.6/tpl_custom for detailed information perfdata format when checking mod gearman worker: |worker=10 jobs=1508c Note: Job thresholds are per queue not totals. EXAMPLES
Check job server: %>./check_gearman -H localhost -q host check_gearman OK - 0 jobs running and 0 jobs waiting. Version: 0.14|'host_waiting'=0;10;15;0 'host_running'=0 'host_worker'=3;5;10;0 Check worker: %> ./check_gearman -H <job server hostname> -q worker_<worker hostname> -t 10 -s check check_gearman OK - host has 5 worker and is working on 0 jobs|worker=5 jobs=96132c SEE ALSO
The Mod Gearman documentation is available in /usr/share/doc/mod-gearman/README.html check_gearman 1.3.6-1 July 2012 CHECK_GEARMAN(8)
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy