SuSE Cron Question

From: Bill Last Name Omitted (foolishewe_at_hotmail.com)
Date: 03/20/04


Date: 20 Mar 2004 14:59:59 -0800

Hi all:

I've got some machines in my lab, and have migrated off Redhat 7.3 on to Suse 9.0
(in part to get around end of life issues, and to fit into the local Uni's
culture of SuSE as our local distro flavor).

So far SuSE has been good, but I'm not quite sure how to automate my backups.
I want to run backups on the morning before every business day.

On Redhat, I created my own cron directory and their cron had a run-parts
that I used to trigger a backup by creating a cron.weeknight directory and
making a script that initiates backups.
# Old Redhat crontab follows
MAILTO=root
# run-parts
# WAM Modified, added week day support and comments on syntax
# We want backups to run overnight, changing tapes on Tuesday-Friday
# Weekly backup tapes are changed on Monday Morning (but run Sunday Morning)
# Minute Hour DayOfMonth Month DayOfWeek User Command
  01 * * * * root run-parts /etc/cron.hourly
  02 4 * * * root run-parts /etc/cron.daily
  22 4 * * 2-5 root run-parts /etc/cron.weeknight
  22 4 * * 0 root run-parts /etc/cron.weekly
  42 4 1 * * root run-parts /etc/cron.monthly
# End Redhat 7.3 modified crontab

On SuSE, I'm not clear how to create a class of jobs that run at a time
of my choosing, since it seems that cron wants the jobs to be in directories
named cron.{}
The installed SuSE 9.0 crontab looks like:
#Begin Suse 9.0 installed crontab
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons
>/dev/null 2>&1
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
#End Suse 9.0 installed crontab

Do I need to hand edit /usr/lib/cron/run-crons to get events scheduled
at a time of my choosing to run, or is there a better technique?
Does YAST have a tool for managing the cron file, or should I run crontab -e?

Thanks:

Bill (Last name omitted to prevent spam)



Relevant Pages

  • backups?
    ... I'm considering switching from redhat to suse. ... backups of my systems using dump/restore. ...
    (alt.os.linux.suse)
  • Re: Red Hat 9 or SuSe or ??
    ... After becoming thoroughly confused by the Debian download ... Suse includes a useful DVD-ROM in the ... The single most annoying point with Redhat for me is ... I think for a first time user, Suse might be easier to use from a desktop ...
    (alt.os.linux.redhat)
  • Re: Novell aquired SuSE
    ... I don't see how SuSE would be any less good than Red Hat. ... for the now-compulsory RedHat support contract is small beer. ... I've just tried out the SUSE 9.0 RC1 Live Eval CDROM, ...
    (linux.redhat)
  • Re: need some info on a small network...
    ... I guess what I like suse and redhat more than slackware because they ... >instance) and Win2K Server was a couple of registry tweaks. ... the distinction between RedHat Workstation ...
    (comp.os.linux.networking)
  • Re: [OT] An interesting view of Linuxs cost
    ... A lot of people prefer Suse over RedHats versions. ... RedHat 7.1 had a problem during boot up... ... Linux if you are sharing a hard drive. ... Not enough documentation to get a user going. ...
    (comp.os.vms)