LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-09-2001, 11:37 AM   #1
Will
Member
 
Registered: Aug 2001
Posts: 73

Rep: Reputation: 15
cron / anacron / fcron


Ok, I have no idea how to make them work?

Cron: seems to be for machines that are expected to have a constant uptime.

Anacron: seems to be for machines that do not have a constant uptime but actions are carried out in n day's.

fcron: seems to fit the above 2.

Can fcron make the other two obsolete?

Sorry the main question:

I have tried all three but can't seem to get them to work. from what I can understand fcron is the one I need.

1. I need to have mozilla start at 00:01 every night.
2. I need to disconnect from the net pppd at 0800 every morinig.

Could you show me an example of what files to edit, add and where so that it works?
 
Old 11-09-2001, 01:06 PM   #2
phek
Member
 
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196

Rep: Reputation: 30
ok i'm not sure what anacron or fcron are, but i'm pretty sure they all use the same old crontab

basically with cron you want to create a new file, which crontab will open up a vi session for you with the -e option, and in this file you would want to put the following sytanx
minute hour day month dayofweek command

crontab -e
and now you should have an open vi session, now in here you would add the following:
1 0 * * * mozilla #or whatever the command is to open mozilla
0 8 * * * pppd -disconnect #or whatever the command is to disconnect


basically the first says, on the first minute of the 0 hour (00:01), every day, of every month, no matter what day of the week it is, open mozilla.
same with the second except its 8am on the hour.

now save the file and you have your crontab, to view your current crontab, do crontab -l
 
Old 11-09-2001, 01:16 PM   #3
Will
Member
 
Registered: Aug 2001
Posts: 73

Original Poster
Rep: Reputation: 15
Yep that's the same syntax i've been using (thats a relief)

But what do I do with the file, Where do I save it?

Do I have to do anything else?
 
Old 11-09-2001, 01:34 PM   #4
phek
Member
 
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196

Rep: Reputation: 30
if you do crontab -e it will automatically pick out the path and filename to save it to, just dont change it when you try to save, with slack, it saves it to /var/spool/cron/crontab.#### those are actually some form of numbers, but, later i believe it moves it to /var/spool/cron/crontab/<username>, just save the file to the default location and it will run.

you should make sure you have crond running though. do a
ps -ax
and you should see it there, if not run
crond -l10
the -l10 is log level 10, or debug and put it in your rc.local (may be different for other distro's than slackware.
crond checks the crontab file once a minute to see if it should execute a job, if so it executes, if not it sleeps till the next minute.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron/Anacron Not Working - Debian Sarge br00tal Debian 2 10-10-2005 06:41 PM
Fcron cant find fcron user in passwd OnFire Linux From Scratch 16 07-07-2005 08:29 AM
anacron startscript juli SUSE / openSUSE 2 05-01-2005 01:51 PM
fcron fails to run jobs ahh Linux - Software 4 03-13-2005 07:29 AM
w. placement g2+mc // lvm module // fcron mritch Debian 1 06-13-2004 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration