HelioHost Posted October 25, 2016 Posted October 25, 2016 run pythonTo: support@heliohost.org Hi, How do I run python from cron job? Where should I put my python file andshould I configure something? Thanks, Tal
Byron Posted October 25, 2016 Posted October 25, 2016 Does your python file execute just by clicking on it? If so it should run just like a perl file if I'm not mistaken. The file can be anywhere on your site as long as you set the correct path at your cron manager. I have a cgi file who's path is set like this at my cron manager with no other special configuration except the time the cron runs. /home/byron/public_html/misc/remindme.cgi send_reminders
HelioHost Posted October 25, 2016 Author Posted October 25, 2016 Re: [HH#13318]To: support@heliohost.org Thanks for the fast replay.I create a simple python file for test, its only print to file but i dontget mail for the crontab to run or file with the output.i use this command in the crontab:python /home/rontal13/public_html/test.py and test.py contain:#!/usr/bin/pythonwith open("/home/rontal13/tes.txt", "w") as f:f.write("success")print "test" 2016-10-25 21:25 GMT+03:00 : > Does your python file execute just by clicking on it? If so it should run> just like a perl file if I'm not mistaken. The file can be anywhere on your> site as long as you set the correct path at your cron manager. I have a cgi> file who's path is set like this at my cron manager with no other special> configuration except the time the cron runs.> > /home/byron/public_html/misc/remindme.cgi send_reminders>> You may view the status of your ticket by visiting:>> http://www.helionet.org/index/index.php?showtopic=26377>> Thank you,> Heliohost support> http://www.heliohost.org/> http://www.helionet.org/>>
Byron Posted October 25, 2016 Posted October 25, 2016 3 things: Right now your file isn't executing: http://rontal13.heliohost.org/test.py You've got the wrong path for your file. Your home directory should be /home1/ instead of /home/ Also I don't know if you need python in front of your path or not. You've ran too many cron jobs and your site got suspended. You can only have 2 cron runs per 24 hours.
HelioHost Posted October 26, 2016 Author Posted October 26, 2016 Re: [HH#13318]To: support@heliohost.org I understand thanks for let me know.Last question, is there way to install new Python packages? On Oct 25, 2016 23:51, wrote: > 3 things:> > Right now your file isn't executing: http://rontal13.heliohost.org/test.py>> You've got the wrong path for your file. Your home directory> should be /home1/ instead of /home/ Also I don't know if you need python in> front of your path or not.>>> You've ran too many cron jobs and your site got suspended. You can> only have 2 cron runs per 24 hours.>>>> You may view the status of your ticket by visiting:>> http://www.helionet.org/index/index.php?showtopic=26377>> Thank you,> Heliohost support> http://www.heliohost.org/> http://www.helionet.org/>>
Byron Posted October 26, 2016 Posted October 26, 2016 Ok I've unsuspened your account. As far as new packages go, probably not. But you can make a request in our help forum here: http://www.helionet.org
HelioHost Posted October 26, 2016 Author Posted October 26, 2016 Re: [HH#13318]To: support@heliohost.org My account is still suspended, and I cannot login On Oct 26, 2016 14:26, wrote: > Ok I've unsuspened your account. As far as new packages go, probably not.> But you can make a request in our help forum here: http://www.helionet.org>>> You may view the status of your ticket by visiting:>> http://www.helionet.org/index/index.php?showtopic=26377>> Thank you,> Heliohost support> http://www.heliohost.org/> http://www.helionet.org/>>
wolstech Posted October 26, 2016 Posted October 26, 2016 It was for 6 cron jobs. You can only use cron to execute a script twice per day or you get suspended. Unsuspended.
Byron Posted October 26, 2016 Posted October 26, 2016 This is the 3rd time your site has been unsuspended for the same thing. Stop running so many cron jobs or you'll be suspended permanently.I just unsuspended him again for 12 cron jobs. Do not unsuspended his account again.
Recommended Posts