Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: cron log file location

  1. #11
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: cron log file location

    !????? How do you mean? Every line in /var/log/messages has a timestamp when the event happened so you know when the job was started.

  2. #12
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: cron log file location

    This one doesnt...

    I set event in 8:40, I have messages till 8:38 and returning back at 8:42
    and process executed as I typed "ps -A" in 8:40 and it was running.

  3. #13
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: cron log file location

    I don't understand your sentences.

    Only the start time of the job (by the computer clock of course) and the command are logged. It doesn't log how long the command took, or when it finished.

    If you need to know these things, you can put your own commands in the cron job before and after the work. E.g.

    Code:
    10 2 * * * /bin/date; /usr/local/bin/somecommand; /bin/date
    The output of the job is mailed to the owner of the job, root if a system job. If you want to capture the output, you can use shell redirection. E.g.

    Code:
    10 2 * * * (/bin/date; /usr/local/bin/somecommand; /bin/date) > /root/job.log 2>&1

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •