Koozali.org: home of the SME Server

Cron problem

Offline toothandnail

  • ****
  • 139
  • +0/-0
Cron problem
« on: April 09, 2008, 08:14:09 PM »
I've hit a strange problem with cron. I thought I'd followed all the correct instructions, but it doesn't seem to be working....

I set up an extra cron event using the instructions I found here:

http://forums.contribs.org/index.php?topic=29433.msg122856#msg122856

The only problem I had with the instructions was that I don't seem to have

Code: [Select]
/etc/e-smith/events/actions/restart-crond
As a quick fix, I restarted the server (its purely a test box at present). From the logs, cron restarted correctly, and has executed at least one event since the restart.

However, the event that I added has not run. It should run a small backup utility called Snybak. Synbak is running fine from the command line, and I have run it from cron on other machines. On my test SME Sever, it doesn't seem to have even started. There are no errors in the log, just no sign of the backup being made.

The cron entry I created as a test is as below:

Code: [Select]
30 18 * * * /usr/bin/synbak -s goldie -m tar -M gz
Can anyone tell me what I've done wrong? Using 'more /etc/crontab' shows the new event, so I'm at something of a loss to understand why it isn't working.

paul.

Offline brianr

  • *
  • 990
  • +2/-0
Re: Cron problem
« Reply #1 on: April 09, 2008, 08:42:42 PM »
I notice you have not specified the user to run under, specified between the end of the time spec and the command.  Cron might be parsing the entry wrongly.

Also remember that /etc/crontab is templated, so it is not very robust to just write into that file.

Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline toothandnail

  • ****
  • 139
  • +0/-0
Re: Cron problem
« Reply #2 on: April 09, 2008, 09:39:32 PM »
I notice you have not specified the user to run under, specified between the end of the time spec and the command.  Cron might be parsing the entry wrongly.

Thanks. That was it. I'll have to remember that. The last version of cron I used wasn't bothered by that..

Quote
Also remember that /etc/crontab is templated, so it is not very robust to just write into that file.

 :) I updated the template and re-expanded it. Then restarted cron. Seems to have worked pretty well.

paul.