honging
08-19-2002, 05:31 AM
i've created a script that essentially does a quick mysqldump of a database (or rather, i borrowed it from somebody).
the script works; i've tested it from command line.
however, when i create a crontab, it doesn't seem to work. i crontabbed a file with te following:
40 4 * * * /path/to/script (i acutally put the path in)
crontab file.run
however, when it was 4:40am, the script didn't run. do i have to wait ir something?
:/
thanks!
GideonX
08-19-2002, 08:55 AM
the script works; i've tested it from command line.
he already said he tested it...the next step i would think, is to test that path to the script. make sure it points correctly to the right place.
when you do:
crontab -l
does it list your cronjob? also, what user did u cronjob it as? maybe the script isn't chmod correctly...
honging
08-19-2002, 11:45 AM
the path does work ... i typed in the path listed when i do the crontab -l and it executes the script.
blacknight
08-19-2002, 12:49 PM
Do you have full access to the server, or are you an end-user?
honging
08-19-2002, 01:44 PM
full server.
i created the crontab as root, btw.
blacknight
08-19-2002, 01:51 PM
Make your life a lot easier :D
Install webmin and use that for controlling your crontabs etc.,
if you type crontab -l
can you see the cronjob listed?
blacknight
08-19-2002, 03:09 PM
Try using webmin to control it - it's a lot easier
blazeman
08-19-2002, 04:29 PM
Are you getting any type of error from the cronjob?
honging
08-19-2002, 05:07 PM
where do i check for errors for crontabs?
honging
08-19-2002, 05:10 PM
i think i found it in /etc/log/cron
i saw this:
tmp.9930 (08/19-04:38:00-403) ORPHAN (no passwd entry)
... ?
blazeman
08-19-2002, 07:48 PM
Did you include a password in the file you are running to do the SQL dump?
honging
08-19-2002, 09:18 PM
yes.
i do -uroot -ppassword (obviously i'm not posting the password here)
=)
blazeman
08-19-2002, 09:22 PM
are you actually doing it that close, or are you putting a space between the -u and the -p?
chirpy
08-20-2002, 08:12 AM
One thing to remember when running a shell script from a CRON job is that it most likely won't have the same path and environment variables set as when you login interactively. So, check the shell script and make sure you are using absolute paths to all commands, just to be certain.
It might help if you pasted here what you're actually running (the script), omitting anything like passwords.
Yikes :eek:! We can't delete posts:confused: