[ale] cron vs. command line

James P. Kinney III jkinney at localnetsolutions.com
Sat Oct 26 11:46:26 EDT 2002


Put the entire bash stuff in a script file and have cron call it to run.

On Sat, 2002-10-26 at 11:40, Denny Chambers wrote:
> Hi All,
> 
> 	I have put together a simple backup script to back up my home directory 
> on my development box. I have it scheduled to run in a cron job. The 
> problem is that what I tested on the command line, does not work in the 
> cron job. I am sure I am missing something simple here.
> 
> Here is the crontab entry:
> 5 0 * * *       $HOME/bin/backup.sh >> 
> $HOME/logs/backuplog-${HOSTNAME}-$(date +%m-%d-%y).log 2>&1
> 
> 
> here is the error i get in my inbox:
> Subject: Cron <dchambers at honeybee> $HOME/bin/backup.sh >> 
> $HOME/logs/backuplog-${HOSTNAME}-$(date +
> 
> /bin/sh: -c: line 1: unexpected EOF while looking for matching `)'
> /bin/sh: -c: line 2: syntax error: unexpected end of file
> 
> 
> is there some thing wrong with this:$(date +%m-%d-%y)
> 
> or is there a limit on the command length in a crontab file????
> 
> Thanks,
> Denny
> 
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
-- 
James P. Kinney III   \Changing the mobile computing world/
President and CEO      \          one Linux user         /
Local Net Solutions,LLC \           at a time.          /
770-493-8244             \.___________________________./

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7 



 This is a digitally signed message part




More information about the Ale mailing list