Mailinglist Archive: opensuse (3217 mails)

< Previous Next >
Re: [SLE] Cron Jobs
  • From: Roland Hill <rolandh@xxxxxxxxxxxxxxxx>
  • Date: Thu, 18 Mar 2004 22:56:14 +1300
  • Message-id: <20040318095614.GE11716@xxxxxxxxxxxx>
Hi Donald,

* Donald Henson <wepin@xxxxxxxxx> [18-03-04 04:58]:

> Before you blow me off, let me say that I've been using Linux for about
> six months and this is the first time I've had occasion to set up a cron
> job. And before you tell me to RTFM, I've already done that as well as
> several exchanges on mailing lists and a couple of online tutorials. I'm
> here to tell you that I'm confused. You may need to know that I'm
> running SuSE Linux 9.0, since SuSE appears to handle cron jobs
> differently than everyone else.

Know how you feel!

Others have mentioned crontab -e. I didn't know about this until they
responded to your post.

FWIW, I do it this way:

- create a text file in your home dir (location of your choice) and have
the necessary statements. Here's a bit from mine:

SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
20 17,22 * * 1-5 /usr/bin/getmail

- as root issue crontab - u <username> /home/username/pathtofile/filename
- as root issue crontab - u <username> -l

the later will list the crontab entry, and it will look like:

rrl03:~ # crontab -u roland -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/home/roland/Files/rahcron installed on Sun Mar 14 15:26:25 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
20 17,22 * * 1-5 /usr/bin/getmail

Those more experienced may do it better, but this works for me.

Hope this is of some help.

--
Regards,

Roland Hill Registered Linux User #330226
http://pl.net/~rnrhill/rhweb.htm @ http://counter.li.org

< Previous Next >
Follow Ups
References