03-16-2016
Grep the 'not running' jobs and will send the update in mail with its name(job)
my request is:
i have to create a script , which will grep the 'not running' jobs and will send the update in mail with its name(job)
Scenario:
logged in to machine abc
went to particular path: cd /a/b/c
then ./script1.sh status (script.sh is a script,whose status gives info about 10 jobs whether they are running or not running)
my idea is: ./scripts.sh status | grep not
so help me to create another script that grep the 'not running' from script.sh status and send the mail with the job name.
NOTE: this script should run in every 15 mins
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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. 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
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
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
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
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
LEARN ABOUT DEBIAN
qorder
qorder(1B) PBS qorder(1B)
NAME
qorder - exchange order of two pbs batch jobs in a queue.
SYNOPSIS
qorder job_identifier job_identifier
DESCRIPTION
To order two jobs is to exchange the jobs positions in the queue or queues in which the jobs resides. The two jobs must be located at the
same server. No attribute of the job, such as priority is changed. The impact of interchanging the order with the queue(s) is dependent
on local job scheduled policy, contact your systems administrator.
A job in the running state cannot be reordered.
OPERANDS
Both operands are job_identifiers which specify the jobs to be exchanged. The qorder command accepts two job_identifier operands of the
form:
sequence_number[.server_name][@server]
The server specification for the two jobs must agree as to the current location of the two job IDs.
STANDARD ERROR
The qorder command will write diagnostic messages to standard error for each error occurrence.
EXIT STATUS
Upon successful processing of all the operands presented to the qorder command, the exit status will be a value of zero.
If the qorder command fails to process any operand, the command exits with a value greater than zero.
SEE ALSO
qsub(1B), qmove(1B), pbs_orderjob(3B), pbs_movejob(3B)
Local qorder(1B)