Solved

cron job logging

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Backup & Restore 3 66
Like to learn Linux, need advice for a good book and setup. 3 55
Can't ping New Linux Servers 40 90
php56-php-mcrypt for rhel7 php56 1 48
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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.

856 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