• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

cron output to a log file...how?

How can I output any error or return messages to a log file. I am running several jobs throughout the day and would like to see if any error are returned. What is the best way of doing this?

Thanks in advance.
0
GilaMonster
Asked:
GilaMonster
  • 2
  • 2
1 Solution
 
GilaMonsterAuthor Commented:
Adjusted points to 250
0
 
RobWMartinCommented:
Redirect the output to the log file.  E.g.

* * * * * /usr/local/bin/important_job 2> /var/log/important.log

Hope this helps!

Rob
0
 
GilaMonsterAuthor Commented:
Thanks Rob for the quick response. Well worth the points.
0
 
RobWMartinCommented:
Thank you.
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now