SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I have just read in slackware-basics that there is a default slackware root crontab which runs scripts in various /etc/cron directories.
Not being aware of this, I have over-written the default crontab to run my own rsync script. Presumably I have lost what might be some useful functions in the default crontab.
Login as root and do "crontab -e" and paste this in
Code:
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system, but if they don't the average newbie
# might get quite perplexed about getting strange mail every 5 minutes. :^)
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
Mount your Slackware installation CD, and re-install the package named: "dcron-2.3.3-i486-6.tgz" (in the "/a" directory) this should reinstall the default crontab as well.
If you don't want to reinstall the whole package, just do a "tar xvzf dcron-2.3.3-i486-6.tgz" in a directory (for instance in /root) and look for the correct crontab file. I can't remember if this is a separate file in the package or if this is generated by the installation procedure for the package.
Probably not a big issue if you have a strong multi-core machine, but it makes a hell of a difference on my P3-800.
I do the same thing on my box. I have a dual core box but I still prefer using nice as background tasks should never get in my way.
Quote:
The irony is that my PC is never on at 4am so I will have to do some editing.
Yes, the overall design philosophy is for dedicated 24/7 servers rather than desktops. So modify the cron schedule to fit your usage needs. Running cron jobs on a desktop is a tad more challenging than a 24/7 server. Some people use anachron. I wrote a shell script to do much the same:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.