[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: manually running cron



On Tue, Jan 12, 1999 at 10:10:33PM -0500, MallarJ@aol.com wrote:
> I have cron installed, and I'm sure it should be running things that I'm not
> currently running - like the locate database update.  My problem is, I'm on a
> laptop, and I shut it down when I'm done with it.  So, is there a way to get
> the cron stuff to run manually?  Or possibly at bootuptime?

I use anacron on my home machine, because it is powered up only a few
hours (or even minutes) a day and would miss regularly scheduled cron
"time windows."  The package installed and configured itself flawlessly
and took over the cron duties.  It figures out what has not been run
since the machine was last up and starts scheduling the jobs starting
about 5-minutes after power-up (the exact time is configurable of course).

But that may NOT what you want for a laptop.  The last thing you want if
you're running off a battery is for a bunch of (ana)cron jobs to start
and suck up all the battery juice by exercising the disk drives!

You can always run the stuff manually, either by time-frame "batch"
(daily, weekly, etc.) like this:
	run-parts --report /etc/cron.daily
	run-parts --report /etc/cron.weekly
	...
or by kicking off an individual job:
	sh /etc/cron.daily/find
	...
(Of course, you need to be root to run these jobs, so make sure to use su
or sudo.)  This way you have complete control of when the tasks are run
(e.g., when you have the laptop plugged into a power source).

- MikeT

-- 
Michael E. Touloumtzis <toumi01@cai.com>


Reply to: