![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log | Keith Johnson | AIX | 0 | 01-09-2008 04:32 PM |
| Script doesn't work, but commands inside work | cheongww | UNIX for Dummies Questions & Answers | 2 | 11-14-2006 06:52 PM |
| Command doesn't work under cron ? | bigjohn-nj | Shell Programming and Scripting | 4 | 01-20-2006 12:38 PM |
| script didn;t work in cron !!! @_@ | stancwong | Shell Programming and Scripting | 2 | 10-04-2005 06:25 AM |
| ncopy doesn't work from cron | Selma | UNIX for Dummies Questions & Answers | 2 | 01-20-2005 05:28 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Simple cron job won't work
I have a script in a directory -say users/me/test/
It looks like this: # "bkup" - copies specified files to the user's ~/Backup # directory after checking for name conflicts. a=$(date +%T) cp $1 ~/test/Backup/$1.$a It copies file.txt from current directory and timestamps the name of it of it. No problem there. bkup runs ok I have a cron job that looks like this: 54 18 * * * /`users/me/test/bkup I do crontab cron.txt and get no error I set it up to run in the next few minutes. When the appointed time comes, instead of getting a new file copied, i get a mail from the Unix saying Your "cron" job on thebox /users/calcdev/coregan/pocbatch/bkup produced the following output: sh: /users/me/test/bkup^M: not found What incredibly simple thing am I doing wrong? Do I have permissions to run the job. Seems like it can't find the script to run it. |
| Forum Sponsor | ||
|
|
|
|||
|
^M was the carriage return as described previously thanks to everyone.
I was editing it in UltraEdit because I can never get to grips with vi editor - I know that's blasphemy! - but UltraEdit is so much easier to use. Apart from when there are carriage returns in there of course! |
|||
| Google UNIX.COM |