|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script runs fine, but not in a cron
Okay, I have the following script that runs fine from a command line as well as an executable .sh file. It just moves any file/folder with movie* in the name to a folder called _Movies. The issue I'm running into is when it's call from a cron. Code:
find /mnt/HD_a2/BT/complete -iname "movie.*" -exec mv {} /mnt/HD_a2/BT/complete/_Movies \;Crontab looks like the following, with my scripts being called move_downloads.sh Code:
32 2 * * * /usr/sbin/rtc -s 30 2 2 * * /usr/sbin/rtc -c 59 1 * * * /usr/sbin/daylight & */10 * * * * /usr/sbin/offl_chk two & */60 * * * * /usr/sbin/getdhcp& * * * * * /ffp/sbin/move_downloads.sh >> /mnt/HD_a2/move_downloads.log 2>&1 I realize it's running every minute, but it's set that way while I debug it. I get the following in the log file, and the movie does not move when the cron job is ran. Code:
BusyBox v1.00-pre1 (2008.09.02-11:43+0000) multi-call binary Usage: find [PATH...] [EXPRESSION] Any ideas? I'm going crazy trying to figure out what could be wrong. Thanks! |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
hello, when you remove the Code:
2>&1 part it will work. I think the answer is hidden in this link that i saw a few days ago here : http://www.unix.com/shell-programmin...login-csh.html |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
I just tried that, but it still doesn't seem to work. I get the same results, but now with an empty log file.
|
|
#4
|
|||
|
|||
|
Quote:
Code:
export PATH=/ffp/sbin:/ffp/bin:$PATH By the way do you know this forum: DSM-G600, DNS-323 and TS-I300 Hack Forum? This would be a good place to raise such issue. Cheers, Loïc. Last edited by Loic Domaigne; 01-24-2010 at 03:28 PM.. Reason: grammar |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Thanks! That was the issue. I appreciate you help.
|
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cron job fails, but works fine from command line | cdunavent | Shell Programming and Scripting | 3 | 09-24-2008 12:58 PM |
| Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server | madhunk | UNIX for Dummies Questions & Answers | 5 | 01-31-2008 12:30 PM |
| SFTP errorcode 1 when run on cron but runs manually | Heidi.Ebbs | Solaris | 2 | 08-08-2007 12:16 PM |
| Old cron entry still runs, but shouldnt | xadamz23 | UNIX for Advanced & Expert Users | 3 | 10-11-2005 05:11 PM |
| What user runs cron? | michieka | UNIX for Dummies Questions & Answers | 10 | 06-02-2002 10:32 PM |
|
|