Run cron.php with python.
Last modified: December 13, 2008 - 18:53
I was unable to run cron.php from the cpanel cron on a multisite because I had no access to curl, lynx and wget. I knew I had python installed in the shared server so what I did was to create a python script in my home folder called wget.py
import sys, urllib
def reporthook(*a): print a
for url in sys.argv[1:]:
i = url.rfind('/')
file = url[i+1:]
print url, "->", file
urllib.urlopen(url)Then, in the cron configuration, just add the command:
/path/to/python /path/to/wget.py url1/cron.php url2/cron.php url3/cron.php| Attachment | Size |
|---|---|
| wget.py_.txt | 218 bytes |
