homepage Welcome to WebmasterWorld Guest from 54.145.209.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Cron Job Not Working
Probably Easy Solutin (I hope!)
carfac

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3525894 posted 2:51 pm on Dec 12, 2007 (gmt 0)

Hi:

I have a simple cron job for rotating backup files. It is run by a script. I see it running, but it is not actually rotating the files. Probably something stupid I am missing, like a flag to the copy "cp" command, but I do not know what it is. Anybody want to look at my script and see what they think?

Script:

cp /hd2/backups/#*$!3.tar /hd2/backups/#*$!4.tar
sleep 30
cp /hd2/backups/#*$!2.tar /hd2/backups/#*$!3.tar
sleep 30
cp /hd2/backups/#*$!1.tar /hd2/backups/#*$!2.tar
sleep 30
cp /hd2/backups/#*$!.tar /hd2/backups/#*$!1.tar
sleep 150

(the script repeats with various other files, but this is the basic format)

Thanks!

Dave

 

RonPK

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3525894 posted 1:54 pm on Dec 14, 2007 (gmt 0)

Some thoughts:
Does the command work if you run it from the command line?
Does the cron user have the necessary permissions to overwrite existing files?
What is the output of
cp -v /hd2/backups/#*$!.tar /hd2/backups/#*$!1.tar (-v for being verbose)?
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved