Recent Articles

Xen GUI In Fedora Core 6
Fedora Core is Red Hat's Linux distribution for testing new technologies. The new version (6) of Fedora Core, which became available for download in November, shows that major Linux vendors see the importance...

Performance Profile For Apache Geronimo 1.1.1.
TheServerSide has a thread announcing that the Apache Geronimo team has released a performance profile for Geronimo 1.1.1. It's a great start and the team should be commended on releasing the results even...

Oracle Linux
At "Larry Ellison's Linux nears release", Ashlee Vance is unsure why Oracle would want its own Linux distro. Actually, it makes a lot of sense. It's not the direct revenue of selling the OS with the database...

Make A Linux Home Data Server Of An Old PC
So, you've got an old computer, and you don't know what to do with it. Sure, it can't play new video games, maybe can't run the latest and greatest software, don't fret, it's not totally worthless. Converting your old computer...

Linux Flash Player Saga Continues
Adobe's Mike Melanson has posted some more information about the lengthy delays in releasing a new version of Flash Player for Linux. "What could possibly be so difficult about porting the Flash Player to Linux?"

Linux Options Omitted From Vista Survey
It's either the Microsoft way or the highway for computer users according to a survey about the economic impact the Vista operating system could have in Europe. The potential for Linux making an impact...

12.19.06


Cron Isn't Working?

By A.P. Lawrence

Let's just get this out of the way first: when someone says cron is not working, it almost always is, and they have just misunderstood something basic.

Usually that's not understanding the environment that cron scripts run under or that the machine was physically shut off at the time cron was supposed to do something.

However, for the sake of completeness, we'll run through everything you might check, including the rare case of cron itself not running at all.

You'll find a "cron" script in /etc/init.d on most systems. I say "most" not because I've ever seen it anywhere else, but because it could be started elsewhere. For example, Mac OS X cron is handled by "launchd" (and is not used for anything by default). Ubuntu is going to be changing init soon (see Replacing init with Upstart), and Upstart will eventually replace cron entirely. I expect that soon enough "cron" will be replaced everywhere, if not by Upstart then by something very like it. But that's still the future as I write this, so I'll assume your cron starts from /etc/init.d. Therefore, the very first question is "Did that script run?":



The "ls -lut" shows the time the file was last "used" - executed or read. This system was booted just prior to that time, so this makes sense. Is cron still running?



Low Rate eCommerce & Retail Plans

OK so far. Next we'll see if it has looked at its files:



Cron should read /etc/crontab when it starts up, so this matches. What /etc/crontab actually does depends on your system. For example, this is from an older RedHat system:



Continue reading this article.


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

About LinuxDeveloperNews
Get the lastest information on current changes in the Linux Development World.

LinuxDeveloperNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxDeveloperNews.com WirelessProNews.com
CProgrammingTrends.com DevWebPro.com


-- LinuxDeveloperNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
© 2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



LinuxDeveloperNews News Archives About Us Feedback LinuxDeveloperNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact