On a Mediatemple gridserver, I'm trying to run this by a cron set in the control panel:
usr/bin/python /home/xxxxx/html/sitemap_gen.py --config=/home/xxxxx/html/config.xml
But I get the error "python: can't open file '/home/95809/html/sitemap_gen.py': [Errno 2] No such file or directory." But the files are there. MT requires the paths, and there is no difference in the error without the paths.
I can run it manually from ssh:
python sitemap_gen.py --config=config.xml
and have chmoded the script for execution.
Is there a different way to run this script that will work?
MT doesn't have direct examples of python scripts run by cron, and doesn't offer support.
Is there a way to wrap the script in another script - like a bash script - to get away from having to include the paths or invoke python, which I think might be the problem?
Two things i would suggest:
/home/xxxxx/html/sitemap_gen.py
EDIT: oh duh ... try using the full path to python so if the python executable is in
/usr/bin
it would be :/usr/bin/python /home/xxx/html/sitemap_gen.py <blah blah blah>
Create a dummy script (Just print somethign ) and run it via crond. Maybe crond doesn't have the necessary permissions to even read the file.
Propably your user have permissions so can execute it, but crond doesn't