Koozali.org: home of the SME Server

crontab issues

Offline jonash

  • ****
  • 120
  • +0/-0
crontab issues
« on: January 25, 2005, 06:54:58 AM »
Hello,
I have made some scripts which will run with cron.
I made a template in /etc/e-smith/templates-custom/etc/crontab, and the entries are inserted in /etc/crontab with the expand-command.
The problem is, that the script are not running.. :(
I even restarted crond, but it didn't help. The old things in /etc/crontab still run as before.
I looked at root's crontab  with the command crontab -l, but this doesn't seem to reflect the entries in /etc/crontab.
What's the different between /etc/crontab and /var/spool/cron/root?

Jonas
.........

ClaudioG

crontab issues
« Reply #1 on: January 25, 2005, 10:17:15 AM »
Could you post /etc/crontab?

I have simile issue some time ago, the problem was studip error in line...

Regards
ClaudioG

Offline jonash

  • ****
  • 120
  • +0/-0
crontab file
« Reply #2 on: January 25, 2005, 06:27:12 PM »
This is the /etc/crontab file

Code: [Select]

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 1999-2003 Mitel Networks Corporation
#------------------------------------------------------------

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# run-parts

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
# freshclam times during office hours

47      8-17/2  *       *       1-5     root    /usr/bin/freshclam --quiet

# freshclam times outside office hours

47      0-7/2   *       *       1-5     root    /usr/bin/freshclam --quiet
47      18-23/2 *       *       1-5     root    /usr/bin/freshclam --quiet

# freshclam times during the weekend

47      */2     *       *       6-7     root    /usr/bin/freshclam --quiet

0       0       *       *       0       root    /etc/clamscan


#MySQL
21      18      *       *       *       /usr/local/bin/mysqlbackup
#rsnapshot

02      2       *       *       *       /usr/bin/rsnapshot      daily
22      2       *       *       0       /usr/bin/rsnapshot      weekly
42      2       1       *       *       /usr/bin/rsnapshot      monthly



# logrotate
12 1 */7 * * root       /sbin/e-smith/signal-event logrotate


Any clues?
Jonas
.........

ClaudioG

crontab issues
« Reply #3 on: January 25, 2005, 07:02:55 PM »
mmm...
Code: [Select]
------------------------
#MySQL
21      18      *       *       *       /usr/local/bin/mysqlbackup
#rsnapshot

02      2       *       *       *       /usr/bin/rsnapshot      daily
22      2       *       *       0       /usr/bin/rsnapshot      weekly
42      2       1       *       *       /usr/bin/rsnapshot      monthly
------------------------

in these lines there is no user ... try:

Code: [Select]
#MySQL
21      18      *       *       *  root         /usr/local/bin/mysqlbackup
#rsnapshot

02      2       *       *       *  root          /usr/bin/rsnapshot      daily
22      2       *       *       0  root          /usr/bin/rsnapshot      weekly
42      2       1       *       *  root          /usr/bin/rsnapshot      monthly


Regards
ClaudioG

Offline jonash

  • ****
  • 120
  • +0/-0
Solced
« Reply #4 on: January 25, 2005, 10:24:41 PM »
Thanks, it solved it, should have seen that.. :roll:
.........