Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I am trying to setup a cron job in my Fedora distribution but its not working.
These are the steps I took.
1) Setup a perl script in /home/documents/test.pl - Script just gathers the local time.
2) Setup a cron.test file in /etc/cron.d/
3) Executed the perl script and made sure it wrote to cron.test correctly - It works.
4) Create a cron.job file in /etc/cron.d/
5) I changed the permissions of both these files to RWX. Also changed the group from root to my user name.
6) crontab cron.job(load file to system)
Doesn't seem like the cronjob is working because cron.test never gets written. /etc/log/cron has no entries as well, so it doesn't seem like its entering the function. Can anyone tell me what I'm doing wrong???
I know it is weird, but I have had the problem where the files in /etc/cron.daily (or weekly, hourly,etc) have to contain no dot (.).. If they contain a dot (eg backup.sh) they do not work, but without the dot, (backup) it does... I think it is to do with the way run-parts works....
So try renaming cron.job to cron-job and it should work.!
Yes, I have a perl script that when run, will write to the output file cron.test. I don't see any input in cron.test so I know that the cron job hasn't started correctly. No output is emailed to the user eitehr. I also tried the full path to perl with no luck
Sorry - a bit shorter, cause my browser crashed - and i lost the original message I was going to post....
Test the script as the user, so you know that it works...
Make sure you use full paths for the output file... cron does not run from where you think it might, so relative paths are a bit no-no
Check the user has permission for writing to the output file.
as billymayday said, give full path for perl:
1 * * * * jma /usr/bin/perl /home/documents/test.pl
(determine path to perl by running 'which perl')
Hope these help (if not post the contents of the script test.pl here - there might be something... - feel free to replace security info with example data (foo, bar, USERNAME, PASSWORD, SERVER)
I found no "PATH" statement in the man pages for crontab. Be that as is may, you ask cron to run every minute the job "jma" which seems to be undefined as far as I can see. I don't know whether the "/usr/bin/perl" statement is necessary, so you might try just "/home/jma/Documents/test.pl" in the command field of crontab...
<edit> Ooops, crossposting. Glad you solved it by your own means.
Last edited by JZL240I-U; 05-07-2008 at 02:14 AM.