Skip to main content
added 7 characters in body
Source Link
Chris Davies
  • 128.4k
  • 16
  • 179
  • 324

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

0 * * * * python /var/www/html/boinc.py

Thanks

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

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

Source Link

crontab -e is running my python script but its saving the results of the script in my home directory

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