[web2py] Re: cron job not running at all
For something like that you have to use the unix cron. The web2py cron is only for python tasks. Anyway, cron is deprecated now that we have the scheduler. On Wednesday, 7 January 2015 18:51:48 UTC-6, SHAO MIN wrote: Hello there! I'm also having problem with my cron job.Basically i need to set a command to let the system auto run every 1 mintue but when i try to place the code inside the crontab -e it doesn't work. the command that i need to run is : pscp root @192.168.7.2:/home/debian/Desktop/SensorData/Sensor,txt /home/student/Desktop/sensordata therefore in the crontab -e to run every 1 minute i wrote : */1 * * * * /pscp root @192.168.7.2:/home/debian/Desktop/SensorData/Sensor,txt /home/student/Desktop/sensordata but it doesn't work. Can anybody help? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: cron job not running at all
Hello there! I'm also having problem with my cron job.Basically i need to set a command to let the system auto run every 1 mintue but when i try to place the code inside the crontab -e it doesn't work. the command that i need to run is : pscp root @192.168.7.2:/home/debian/Desktop/SensorData/Sensor,txt /home/student/Desktop/sensordata therefore in the crontab -e to run every 1 minute i wrote : */1 * * * * /pscp root @192.168.7.2:/home/debian/Desktop/SensorData/Sensor,txt /home/student/Desktop/sensordata but it doesn't work. Can anybody help? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: cron job not running at all
Ok I am giving up on cron and going to try the scheduler. One thing I am not sure of is whether or not the scheduler worker task is started automatically by default? How can I tell if there are any worker tasks executing. In the web faction environment how can I start the worker tasks. And do so automatically after a reboot. --
[web2py] Re: cron job not running at all
Cron was broken. Until 1h ago (revision hg 4451). @reboot should also be fixed. The problem was a typo introduced in rev 4278. On Monday, 3 December 2012 15:39:42 UTC-6, david.waldrop wrote: Ok I am giving up on cron and going to try the scheduler. One thing I am not sure of is whether or not the scheduler worker task is started automatically by default? How can I tell if there are any worker tasks executing. In the web faction environment how can I start the worker tasks. And do so automatically after a reboot. --
[web2py] Re: cron job not running at all
I am still working on this with the hopes of getting it to work on my local dev machine before deploying to production, but after reading the forums I am very unsure of the best practice to get a simple background task that wakes up every 10 (or n minutes) does some stuff (in my case see if there is any email delivered to to an imap mailbox and process) then goes back to sleep. I think the oprions are cron, scheduler, or make my own. Shceduler seems like overkill for, rolling my own is way to much work, leaving me with cron. Cron seems to have some options as well that I am not sure I understand form reading the book. It seems each application has its own cron file that can execute controllers in the app, or you can use the system cron tab and invoke a separate instance of web2py passingparameters to tell the new instance what app/controller to execute. Is this correct? what is the best practice or reccommedned way to accomplishing my scenario? As mentioned above I currently have the cron job configured as part of the web2py app, but cannot get the cron job to start. The additioninal info I found onthe forums mentioed an error that I also see on my dev machine: Exception AttributeError: AttributeError('_DummyThread' object has no attribute '_Thread__block',) in module 'threading' from '/usr/lib/python2.7/threading.pyc' ignored the mentions implies this has been fixed and I am not sure if it is related to my issue or not (I suspect so as the error message appears about every 10 minutes in my console window). Anyone have any ideas or suggestions? --