Solved

cron job logging

Posted on 2004-09-17
2
404 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 50 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now