capturing start and end time for a unix jobs / processes

Posted on 2005-02-24
Medium Priority
Last Modified: 2013-12-27
I have a unix job which loads data into the oracle tables. upon completion it sends an email with  log file as an attachment.
This job kicks off several other intermedate shell scripits.

Is there a way to capture

1) start and end time for the main job which kicks off several intermediate jobs
2) start and end time for each of the intermediate jobs
Question by:vsuripeddi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 38

Accepted Solution

yuzh earned 172 total points
ID: 13400886
You can use script to do the job, eg:

echo "Job-1 start $(date)" >> /path-to/mylog
/path-to/job1             #run job 1
echo "Job-1 finish $(date)" >> /path-to/mylog

LVL 51

Assisted Solution

ahoffmann earned 164 total points
ID: 13406383
(echo start `date` && /path-to/job1  && echo -n done || echo -n failed) && date

Assisted Solution

sisiro earned 164 total points
ID: 13406472
Or use: logger -p command in your main script to log the start and end times.
LVL 10

Expert Comment

ID: 13503681
You can use bsm to log any start and end of processes of a specific user. try "man bsmconv" for more detail
LVL 51

Expert Comment

ID: 14363683
I'd suggest a split for first 3 suggestions

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question