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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-09-2001, 11:37 AM
|
#1
|
Member
Registered: Aug 2001
Posts: 73
Rep:
|
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?
|
|
|
11-09-2001, 01:06 PM
|
#2
|
Member
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196
Rep:
|
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
|
|
|
11-09-2001, 01:16 PM
|
#3
|
Member
Registered: Aug 2001
Posts: 73
Original Poster
Rep:
|
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?
|
|
|
11-09-2001, 01:34 PM
|
#4
|
Member
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|