|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
||||
|
||||
|
crontab errors
hello,
so i got this perl script...and when i try to run it via command line it works fine..yet when i put the same syntax in crontab it complains my crontab : 0 8-17 * * 1-5 /home/obtadmin/bin/mac-address-checks.pl create `/usr/bin/date +%m%d%H%M` and it complains that Your "cron" job /home/obtadmin/bin/mac-address-checks.pl create /home/obtadmin/bin/script-data/`date + produced the following output: Couldn't open /home/obtadmin/bin/script-data/ for write so somehow the cron is not evaluating the `/usr/bin/date +%m%d%H%M` correctly..... what must i enclose it in to make it work..like i said, if i just type the same thing in command line then it works.. thanx |
|
#2
|
||||
|
||||
|
How about:
`/usr/bin/date "+%m%d%H%M"` Personally though when I get a crontab that has a commandline that's over 1 argument long I usually put the command(s) into a script and just call the script via crontab.
__________________
FreeBSD Admin Tips Tricks and Scripts |
|
#3
|
|||
|
|||
|
Believe it or not, everything after a per cent sign is stripped from a crontab line and is fed to the command as input. I think that a backslash if front of each per cent sign will prevent this.
I agree with munkfish though, just put the line in a scipt and call that. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > crontab errors |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|