I've got a python script that takes data from some XML files and displays them on a website. The script overwrites the index.html file each time it's run and replaces some text in a HTML template with data stored in some variables. The script works fine.
I put the command in crontab to run every hour, and it works. But it saves the new updated index.html file to the home directory but I want it saved to /var/www/html/. The python script is running from the same location.
Is there a way I can have crontab run the script and save the index.html file the script generates to the correct location? (/var/www/html)
This is the command I've put in crontab:
0 * * * * python /var/www/html/boinc.py
Thanks
cd /var/www/html && python ./boinc.py
.