Cron Job and Mail ClientForum: DSL Tips and Tricks Topic: Cron Job and Mail Client started by: NewLinuxGuy Posted by NewLinuxGuy on Dec. 03 2006,19:48
Using apt-get install cron, i installed the cron and verified that it is running by using ps -fe|grep cron.However, whatever i set up, nothing happend, even a simple scritp as #!/bin/sh echo Hello > /tmp/cron_check seems would not start. I checked man page for cron. It mentioned that cron will email the error message to the account owner. Now my question is that "do I need a mail client/server to use cron?" Thank you so much. Posted by ^thehatsrule^ on Dec. 03 2006,19:52
1. wrong section 2. And no, cron does not need to use mail. (are you sure you know what this is for?) Edit crontab or see the cron docs. Posted by NewLinuxGuy on Dec. 03 2006,19:59
sorry about the wrong section. And yes, i know what cron is and how to use crontab -e to create and -l to list.
Posted by NewLinuxGuy on Dec. 04 2006,20:13
Just in case anyone is looking for answers on using the cron job. This is what I found out that made the cron job working on my installation.1. create the cron.allow under /etc/ with user id dsl in it helps. Even though in therory you don't need to do it if both cron.allow and cron.deny were not exist; 2. Even though in theory that cron deamon wakes up every minute, checks the crontab, and runs any job if needed, but at least in my PC ( a rather quite slow one 100 MHz with 16MB), it needs a few minutes to make the crontab changes into effect. In my test, I always setup the test job to run on next minute to run and it never did. Wasted a lot of my time. Once i setup the test job to run in next 5 minutes, it worked well. Hope this will help someone else save a few minutes. This forum has been great help, thank you! |