Solved

cron job logging

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux hostname change 2 72
Help on running oracle SQL script in linux 3 50
CENTOS DHCP Server / PXE/TFTP 14 79
Upgrade BIOS / EUFI at Scale 4 36
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

777 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