Linux - GeneralThis 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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.