Garayed.com  

Go Back   Garayed.com > Linux
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-19-2007, 07:16 PM
CptDondo
 
Posts: n/a
Default cron and at - how to shcedule and run jobs on a machine that onlyboots occasionally?

I have an old server that gets woken up at midnight, updates its mirror,
and shuts down.

I would like for it to run different jobs based on the day of week, day
of month, etc.

Normally I use cron, but cron assumes it will always be running. So I
looked at 'at', but at least from the manpage it's not clear that it can
handle recurring jobs.

So how do I schedule jobs to be run

when a machine wakes && at or past the time the job should have run?

In other words, let's say I want a job to run once a month. I want this
machine to wake up, say, 'hey, it's that time of month' and run the job.
I want this daemon to be smart enough to say, 'hey, I should have run
that job yesterday, but I didn't wake up so let's run it now.'

I thought 'at' did that, but I can't figure out how to do recurring jobs...

--Yan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2007, 06:59 PM
Moe Trin
 
Posts: n/a
Default Re: cron and at - how to shcedule and run jobs on a machine that only boots occasionally?

On Mon, 19 Feb 2007, in the Usenet newsgroup comp.os.linux.misc, in article
<12tk58ga30u8of7@corp.supernews.com>, CptDondo wrote:

>Chris Jewell wrote:
>
>> There is a cron replacement called anacron that does what you want.


>HAH!
>
>Thank you!
>
>I couldn't for the life of me remember what it was called.


----------
CRON DAEMONS: vixie-cron default for many *nix - for 24/7 systems
dcron (Dillon's Cron daemon) - default in Slackware 24/7
anacron, (for sys not on 24/7)
ucron, Alexander Linden <alinden@gmx.de> (replaces both types)
fcron, http://fcron.free.fr or sunsite (replaces both types)
Thibault Godouet <fcron@free.fr>

Vixie-cron - crontab file /etc/crontab has user field like this
Min Hr Day Mon Wkday user commands
while individual crontabs (crontab -e) lack this user field. Dillon-cron
also lacks this feature. ucron allows a -U=user option in main (system)
crontab. fcron has 'runas' option for root only.

Anacron - timing of daily cron job after power on /etc/anacrontab Anacron
can not schedule commands at intervals smaller than days. It also does not
guarantee that the commands will be executed at any specific day or hour.

fcron and ucron can run either way.
----------

Many distributions include vixie-cron and anacron, so that you can run
either depending on your mode of operation. I don't know of any that
are including fcron or ucron. fcron has some VERY nice features. At
least on sunsite (ibiblio.org), ucron is quite old (2000), and may not be
currently supported.

Old guy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:17 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.