Crontab script on Mac OS X Lion does not work anymore
Posted
by
Nopster
on Super User
See other posts from Super User
or by Nopster
Published on 2011-11-05T15:14:43Z
Indexed on
2012/04/01
5:32 UTC
Read the original article
Hit count: 600
I have a problem with cron tasks. Previously this script worked fine on Mac OS X 10.6 server, but when I initialize it on Lion (client), this script stopped working.
Basically, this .bat
file calls a jar
file (that invokes a loop of mysqldump
commands) to backup several databases on several servers, and runs perfectly if launched by the shell.
cd /Users/nameoftheuser/Desktop/backupper
/usr/bin/java -cp .:Backupper.jar:lib/mail.jar backupper.Main "/Users/nameoftheuser/Desktop/backupper/listasiti.txt" "/Users/nameofthe/Desktop/backupper/config.properties
But if the cron launches the same .bat
file, the generated database backups are 0 bytes.
The cron entry is:
0 0 sh /Users/path/to/file.bat
I believe that the problem is that cron doesn't run as root
. Or what else?
© Super User or respective owner