Results 1 to 5 of 5
Hey guys, i need help in cron, i gt this script on hand, but hw am i going to execute it with cron? my cron source is here...
#!bin/bash
00 ...
- 11-29-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
Cron !!! Help
Hey guys, i need help in cron, i gt this script on hand, but hw am i going to execute it with cron? my cron source is here...
#!bin/bash
00 06 * * * / $home/user/myscript.sh >/dev/null 2>&1
23 0-23/4 * * * /
but hw do i execute it?
- 11-29-2007 #2Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
and why do i keep getting permission deny?
- 11-29-2007 #3Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
A couple of things are wrong there - you don't need the shabang in cron and also for reference your one is incorrect. It is #!/bin/bash. For this line you probably don't need the first / as $home defines your home directory. Bear in mind however that this will most likely not work under cron so replace it with the full path..
That was a little collision between the variable and the path. Make sure also the script has execute permissions.Code:00 06 * * * / $home/user/myscript.sh >/dev/null 2>&1 00 06 * * * /home/user/myscript.sh >/dev/null 2>&1
Code:chmod +x /home/user/myscript.sh
- 11-29-2007 #4Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
But hw come i still get errors like...
"/home/user/cron":3: premature EOF
errors in crontab file, can't install.
- 11-29-2007 #5Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
jeffrey_seeNJ,
post exactly what your trying to put into cron here
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.


Reply With Quote