Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cron job logging

Posted on 2004-09-17
2
Medium Priority
?
414 Views
Last Modified: 2013-12-16
Hi,

I m using RH7.3 -> created a cron job at /etc/cron.d folder

at every interval of 3mins execute a script ->scripts performs a check on 2 file, if it found then write to a file.

from the /var/log/message -> i can see that i perform the job, but it does not write to file after it has checked the 2 file. (by right it should). I set the cron job permission as root & the scripts file has the permission to execute.

how can i enabled the cron job script logging? just to make sure where it goes wrong?

pls advice
0
Comment
Question by:pyloh
2 Comments
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 150 total points
ID: 12082716
Does  your script contain the full path to any programs or files used? Cron doesnt run with the same environment as root - the path settings will be different.
0
 

Author Comment

by:pyloh
ID: 12082773
Hi,

Yes, that is the main problem. After adding the full path i have no issue.
Thanks.

Cheers
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

926 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