DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-22 02:51:21

sarge_in
Member
Registered: 2008-10-09
Posts: 16

Crontab Problem

I had RSync running for a while via cron. However last couple of days it has not been executing at its scheduled time. If I run just the RSync command by its own, it runs absolutely fine, but not via cron.

If I do "crontab -l", I can see the entries, but they never seem to run.

Here is my editcron.sh file:

---------------------------------
#!/bin/sh

CRONTXT=/mnt/HD_a2/crontab.txt

. /mnt/HD_a2/ffp/etc/profile  <--- Tried with and without this line with same result.

# start with existing crontab
/bin/crontab -l > $CRONTXT

# add the Rsync job to execute at 2:05 am - also create a logfile
/bin/echo "36 16 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete /mnt/HD_a2/Main_1 /mnt/HD_b2/Main_1_Bkup >/mnt/HD_a2/ffp/log/rsync.last.log 2>&1" >> $CRONTX

# install the new crontab
/bin/crontab $CRONTXT

# clean up
/bin/rm $CRONTXT
---------------------------------

And crontab -l shows me this:

---------------------------------
*/15 * * * * prescan
*/10 * * * * /usr/sbin/getdhcp&
36 16 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete /mnt/HD_a2/Main_1 /mnt/HD_b2/Main_1_Bkup >/mnt/HD_a2/ffp/log/rsync.last.log 2>&1
---------------------------------


Any ideas?!

Thanks!

Offline

 

#2 2008-10-22 02:59:02

rcblackwell
Member
From: Pickering, ON
Registered: 2008-05-19
Posts: 204
Website

Re: Crontab Problem

sarge_in wrote:

I had RSync running for a while via cron. However last couple of days it has not been executing at its scheduled time.......

---------------------------------
*/15 * * * * prescan
*/10 * * * * /usr/sbin/getdhcp&
36 16 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete /mnt/HD_a2/Main_1 /mnt/HD_b2/Main_1_Bkup >/mnt/HD_a2/ffp/log/rsync.last.log 2>&1
---------------------------------


Any ideas?!

Have you checked the log (rsync.last.log) file for errors?


Bob Blackwell
Pickering, ON

Offline

 

#3 2008-10-22 03:01:01

sarge_in
Member
Registered: 2008-10-09
Posts: 16

Re: Crontab Problem

Yes, but the log file is not created/updated at all (no change in timestamp of the log file). It stays the same as was created by a prior (manual) run of that statement.

Offline

 

#4 2008-10-22 11:36:19

ismora
Member
From: Paris, France
Registered: 2008-07-30
Posts: 30

Re: Crontab Problem

I stumbled on similar things, and alI I could do to make the crontab correctly taken in account was kill crond and start it again.
I already mentioned this (non cron-standard) behaviour here, wondering if this was cron bug or error from my side, but there was no reaction (see last article in http://dns323.kood.org/forum/t2822-Crontab-nobody.html ).


DNS-323 • 2x Hitachi 500MB • RAID1 • FW1.04 • ext3 • Fonz's v0.5 fun_plug
DNS-325 • 2x WD Green 2TB • RAID1 • FW?.?? • ext3 • Fonz's v0.7 fun_plug

Offline

 

#5 2008-10-22 12:09:19

SilentException
Member
From: Island of Krk, Croatia
Registered: 2008-05-04
Posts: 148

Re: Crontab Problem

sometimes crontab file gets screwed (dos format).. try to do

#dos2unix /var/spool/cron/crontabs/root
and see if it works out..


D-Link DNS-323 v1.05 fun_plug-ed + many mods,  2 x 320GB Seagate Barracuda 7200.10 RAID0, Cat6 Gigabit Network, 9k Jumbo Frames, Average (WRITE): 19,32 MB/sec, Average (READ): 28,6 MB/sec

Offline

 

#6 2008-10-22 19:58:21

sarge_in
Member
Registered: 2008-10-09
Posts: 16

Re: Crontab Problem

Thanks for the replies.

Before I saw these responses, I removed fun plug and reinstalled it from scratch. That fixed the problem and cron is now running fine.  --> Love the so-easy uninstall! The longest time was SSH keys regeneration. Apart from that, it took maybe 10 mins (now that I am more comfy with this) - COOL!

If I see the problem again (hopefully not!) will try the above.

Cheers!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB