LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-17-2006, 11:42 AM   #1
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
Task Scheduler FC4, KDE


Hi Folks,

I've set up a task to happen every friday at noon (with no problems) but I was wondering without having to go through a test if anyone knew what would happen if my computer is off at that particular time. Will it upon computer boot up

1. Ignore task and simply wait until the following friday before doing the task (again if the computer is on)

OR WILL IT

2. Do the task as soon as the computer is switched.

Also will the task be performed no matter who is logged in (ie will a root task be performed while a restricted user is logged in)

Lowebb
 
Old 02-18-2006, 05:42 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
cron assumes the PC is on 24/7 and will only run tasks at their scheduled time.

Anacron is a periodic command scheduler and is designed to run those tasks only on day intervals. Anacron is not a full time daemon and does not replace cron. It is designed for those task that need to be run on computers not running 24/7

Tasks will run in the background independent of any user that is logged in.

Last edited by michaelk; 02-18-2006 at 05:46 PM.
 
Old 02-20-2006, 04:05 PM   #3
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Original Poster
Rep: Reputation: 15
I'm interested in the anacron you speak of and I think I've got what it is but can I ask this. I am running FC4 and my anacrontab file has the following 3 lines

1 65 cron.daily run-parts /etc/cron.daily
7 70 cron.weekly run-parts /etc/cron.weekly
30 75 cron.monthly run-parts /etc/cron.monthly

Does this mean anacron will automatically run any jobs which have not been run using cron? If so then there is nothing I have to do to get run the tasks I have set up in cron, correct?
 
Old 02-20-2006, 05:50 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
No, anacron will only control jobs listed in the anacrontab file.

http://www.die.net/doc/linux/man/man8/anacron.8.html
 
Old 02-21-2006, 03:06 AM   #5
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Original Poster
Rep: Reputation: 15
Cheers, I've looked thorugh the documentation link you sent but I still cant work out how to schedule a command to run weekly with this comand. I was lucky enough to use (kcron I think) a gui based cron and didnt have to worry about comman line.

Could you give me an example of running a weekly command at midnight as root user?

Thanks

Lowebb
 
Old 02-21-2006, 08:28 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
You can only specify an interval of days with anacron.

[/quote]7 70 cron.weekly run-parts /etc/cron.weekly[/quote]
This will run weekly i.e every 7 days. The job will not start for 70 minutes.

With cron you can specify day, hour, minute etc.
http://www.hmug.org/man/5/crontab.php
 
Old 02-21-2006, 03:52 PM   #7
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Original Poster
Rep: Reputation: 15
So the comman you entered will run ever 7 days, 70 minutes from the time you entered the command? And it will run the command '/etc/cron.weekly' or 'run -parts'?

Sorry for the constant questions but I'm trying to get get the structure of the comman nailed down

Thanks

Lowebb
 
Old 02-21-2006, 05:19 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
http://www.die.net/doc/linux/man/man5/anacrontab.5.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
More accurate task scheduler lowspeed Linux - General 7 02-17-2005 08:21 PM
kde task bar jstarkde Linux - Newbie 6 08-26-2004 06:55 AM
KDE task switching (alt-tab) problem, also KDE XMMS problem (seperate problems) Cohobin Linux - Software 4 06-26-2004 05:47 AM
Task switching in KDE Budious Linux - Newbie 6 12-22-2003 10:27 PM
task scheduler? is there any? bruno buys Linux - General 1 11-17-2003 03:09 PM


All times are GMT -5. The time now is 07:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration