Re: [web2py] Re: scheduler gives and error about datetime

2020-06-29 Thread AGRogers
Thanks for the update. Hopefully I won't need it 馃槒 On Tue, 30 Jun 2020, 2:12 am Pierre, wrote: > For a temporary solution, i made an external python prg and used cron on > my pi to sync the databases everynight and works find with sqlite syntax. > It's way more extensive work but seems to be rel

Re: [web2py] Re: Scheduler for py4web ?

2019-11-01 Thread Carlos Zenteno
Thanks a lot I read a bit and found out the difference. I erased the post briefly after I wrote it. Thanks again. On Fri, Nov 1, 2019, 4:21 PM Ant贸nio Ramos wrote: > You are confusing things. > Web2py Task scheduler is like linux cron but more powerfull because you > can task a python functi

Re: [web2py] Re: Scheduler for py4web ?

2019-11-01 Thread Ant贸nio Ramos
You are confusing things. Web2py Task scheduler is like linux cron but more powerfull because you can task a python function from your code. Gulp and alike are task automation tools like creating files and folders , compiling jade to html or sass to css. Not the same thing.. and yes you should be a

Re: [web2py] Re: Scheduler is Not Running

2019-05-24 Thread Dave S
On Friday, May 24, 2019 at 1:39:52 PM UTC-7, Suhas Jadhav wrote: > > HI Dave, > > How do I make hcstar as a task. What is wrong in my code? > > Thanks, > Suhas > > The LOAD() helper is meant to be used in a view. It isn't a useful tool in a task. A task has no client, and no user interface.

Re: [web2py] Re: Scheduler is Not Running

2019-05-24 Thread Suhas Jadhav
HI Dave, How do I make hcstar as a task. What is wrong in my code? Thanks, Suhas On Fri, May 24, 2019 at 1:25 PM Dave S wrote: > > > On Friday, May 24, 2019 at 12:05:31 AM UTC-7, Suhas Jadhav wrote: >> >> Hi, >> >> I have following code >> >> def fun1: >> do something >> returns local

Re: [web2py] Re: scheduler trouble

2018-07-09 Thread Yoel Benitez Fonseca
Can you try...cath the task code and send the notification on exception base from the task it self, or make other kind of task that can be schelude fron the first to send the notification in case of failure? El vie., 6 jul. 2018 a las 5:51, Manuele Pesenti () escribi贸: > Hi Dave, > > thanks for

Re: [web2py] Re: scheduler trouble

2018-07-06 Thread Dave S
On Friday, July 6, 2018 at 2:51:48 AM UTC-7, Manuele wrote: > > Hi Dave, > > thanks for your reply, I'm actually debugging but I found that the > problem was a callback I added after scheduler_run update event in order > to be advised by email for failed tasks. > > Is there a more correct way

Re: [web2py] Re: scheduler trouble

2018-07-06 Thread Manuele Pesenti
Hi Dave, thanks for your reply, I'm actually debugging but I found that the problem was a callback I added after scheduler_run update event in order to be advised by email for failed tasks. Is there a more correct way of doing it? Maybe should be a good feature for schduler. Cheers 聽聽聽 Ma

Re: [web2py] Re: Scheduler and far-away tasks

2018-06-11 Thread Joe Barnhart
Hi Richard -- I heartily recommend you take another look at the scheduler old friend. Once you wrap your mind around it, the things it can do will simply amaze you. There are a few key principles you need to grok first, and I still struggle a bit here and there. As far as knowing the result

Re: [web2py] Re: Scheduler and far-away tasks

2018-06-11 Thread Richard V茅zina
Hello Joe, I am not using the scheduler primarilly because I never had time to implemented it. But I miss so much all the things you mention... Let says just configure a task to lock a user account on a specific date in the future when you have employee termination in advance and you have no other

Re: [web2py] Re: scheduler question

2018-02-06 Thread Dave S
On Tuesday, February 6, 2018 at 12:10:18 PM UTC-8, Andrea Fae' wrote: > > I created like in the book. It's a model. I'm scheduling from the database > administrative interface. 2 days ago worked perfectly! I don't know! > > I've never tried that. The production system I run the scheduler on does

Re: [web2py] Re: scheduler question

2018-02-06 Thread andfae
I created like in the book. It's a model. I'm scheduling from the database administrative interface. 2 days ago worked perfectly! I don't know! Il 06 feb 2018 9:05 PM, "Dave S" ha scritto: > > > On Tuesday, February 6, 2018 at 7:58:15 AM UTC-8, Andrea Fae' wrote: >> >> Hello, days ago I started

Re: [web2py] Re: scheduler: force another try, count tries

2017-11-25 Thread Martin Weissenboeck
Thank you, I'll try it. 2017-11-25 5:31 GMT+01:00 Dave S : > > > On Thursday, November 23, 2017 at 12:07:10 AM UTC-8, mweissen wrote: >> >> Thank you - but I think I should explain my question with an example. >> Let's say this is my task in scheduler.py: >> >> def mytask(): >> res = mail.sen

Re: [web2py] Re: scheduler: force another try, count tries

2017-11-24 Thread Dave S
On Thursday, November 23, 2017 at 12:07:10 AM UTC-8, mweissen wrote: > > Thank you - but I think I should explain my question with an example. > Let's say this is my task in scheduler.py: > > def mytask(): > res = mail.send(some arguments...) > if res: > db.emailprotocol.insert(

Re: [web2py] Re: scheduler: force another try, count tries

2017-11-23 Thread Martin Weissenboeck
Thank you - but I think I should explain my question with an example. Let's say this is my task in scheduler.py: def mytask(): res = mail.send(some arguments...) if res: db.emailprotocol.insert(senddata="%s tries before" % number_of_tries) else: do_something_to_repeat

Re: [web2py] Re: scheduler task setting 127.0.0.1 when Host=True

2017-01-31 Thread Ant贸nio Ramos
Solved. Thank you 2017-01-31 17:15 GMT+00:00 Leonel C芒mara : > Yeah that's what I thought. host=True makes URL use request.env.http_host, > except the scheduler doesn't have a real request so it becomes 127.0.0.1. > > Instead of host=True put the actual domain host='ramos.com' or read it > from a

Re: [web2py] Re: scheduler task setting 127.0.0.1 when Host=True

2017-01-31 Thread Ant贸nio Ramos
Forget my sign url function. my mistake... i should have simplified it to the problem... a simple URL('fileit','events','list',host=True) in my scheduler task produces http://127.0.0.1:8000/fileit/events/list Regards 2017-01-31 12:53 GMT+00:00 Leonel C芒mara : > What is sign_url doing? > > How ar

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-10 Thread Niphlod
this is an already-solved problem. fetch scheduler.py from the master repo: you can schedule recurrences using the cronline parameter. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/iss

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread Ant贸nio Ramos
start_time=next_run_time??? 2016-12-09 21:50 GMT+00:00 榛勭ゥ : > just an idea why not set default value? > e.g. > from gluon.scheduler import Scheduler > scheduler = Scheduler(db) > > start_bom = '%s-%s-01 00:00:00' % (request.now.year, request.now.month) > db.scheduler_task.start_time = start_bom >

Re: [web2py] Re: Scheduler and Serial Port Problems

2016-12-09 Thread Richard Brown
Hi Jos茅, Thank you for your post. You are correct that it is a feature of the Arduino architecture that a transition on RTS resets the target microcontroller to enable automatic programming, and it is possible to disable this feature, either as you describe or by removing the capacitor which c

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread Dave S
On Friday, December 9, 2016 at 5:44:34 AM UTC-8, Ramos wrote: > > how do i define first day of every month ? > > [image: Imagem inline 1] > > 2016-12-09 12:18 GMT+00:00 Marlysson Silva >: > >> The problem it with make the sheduler or with date? >> >> To try using some_year/some_month/1 dont't wo

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread 榛勭ゥ
just an idea why not set default value? e.g. from gluon.scheduler import Scheduler scheduler = Scheduler(db) start_bom = '%s-%s-01 00:00:00' % (request.now.year, request.now.month) db.scheduler_task.start_time = start_bom db.scheduler_task. next_run_time = start_bom best regards, stifan -- Reso

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread Marlysson Silva
Why you don't make this programmatically? there you could use libs as calendar to get first day of the month.. Or get current day and calculate difference to next first day of the month Em sexta-feira, 9 de dezembro de 2016 10:44:34 UTC-3, Ramos escreveu: > > how do i define first day of every mo

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread Ant贸nio Ramos
how do i define first day of every month ? [image: Imagem inline 1] 2016-12-09 12:18 GMT+00:00 Marlysson Silva : > The problem it with make the sheduler or with date? > > To try using some_year/some_month/1 dont't work? > > > Em sexta-feira, 9 de dezembro de 2016 07:17:14 UTC-3, Ramos escreveu:

Re: [web2py] Re: Scheduler task every first day of every month ?

2016-12-09 Thread Ant贸nio Ramos
and via appadmin how do i do that? 2016-12-09 11:44 GMT+00:00 榛勭ゥ : > pls try : > *controllers/default.py* > start_bom = '%s-%s-01 00:00:00' % (request.now.year, request.now.month) > > def queue_task_0(): > scheduler.queue_task('scheduler_name', start_time = start_bom, > next_run_time = start_bom)

Re: [web2py] Re: Scheduler and Serial Port Problems

2016-12-06 Thread Jos茅 Luis Redrejo
Hi Richard, maybe I'm wrong, but I think this is not related to web2py at all. Arduino boards are build to make a reset whenever the port is open/reopen so they change to "programming" state. This is made on purpose, but it's trivial to avoid it. If using an Arduino UNO board, just connecting a 10

Re: [web2py] Re: Scheduler error

2016-11-23 Thread Niphlod
BTW: you could be facign this issue that was resolved on master https://github.com/web2py/web2py/issues/1485 On Wednesday, November 23, 2016 at 6:58:03 PM UTC+1, Niphlod wrote: > > it's very simple then: if it's failed , the traceback is stored in the > corresponding scheduler_run table ! > >

Re: [web2py] Re: Scheduler error

2016-11-23 Thread Niphlod
it's very simple then: if it's failed , the traceback is stored in the corresponding scheduler_run table ! On Wednesday, November 23, 2016 at 3:44:03 PM UTC+1, Ramos wrote: > > The task itself is set as failed! > > > > Enviado a partir do meu smartphone Samsung Galaxy. > > Mensagem origi

RE: [web2py] Re: Scheduler error

2016-11-23 Thread ramstein74
The task itself is set as failed! Enviado a partir do meu smartphone Samsung Galaxy. Mensagem original De: Niphlod Data: 23/11/16 13:08 (GMT+00:00) Para: web2py-users Assunto: [web2py] Re: Scheduler error when you say "fail" you mean the status of the task itelf is set as

Re: [web2py] Re: scheduler creates "zombie" processes

2016-11-06 Thread Gualter Portella
Hi, your tip really worked. Thanks. Please see the code below: DAL: indiban_meses = Meses.on(Indiban.meses_id == Meses.id) indiban_anos = Anos.on(Indiban.anos_id == Anos.id) indiban_indicadores = Indicadores.on(Indiban.indicadores_id == Indicadores.id) indiban_empresas = Empresas.

Re: [web2py] Re: Scheduler runs

2016-07-28 Thread Sagar Shah
Ah! Alright. Thanks! On Jul 28, 2016 7:21 AM, "Niphlod" wrote: > are you aware that a task that doesn't return a thing and doesn't fail > won't store any scheduler_run table ? > The rationale is that if you didn't return anything, you don't need the > corresponding line in scheduler_run to retri

Re: [web2py] Re: Scheduler always QUEUED in windows

2016-04-03 Thread Dave S
On Saturday, April 2, 2016 at 10:28:41 PM UTC-7, narges Rezaei wrote: > > thanks a lot . > I did it , the project folder should be in "web2py" folder . my project > was in pycharm folder . after then , i did "cd C:\Users\narges\web2py" and > then start the web2py server with IDE and then "web2

Re: [web2py] Re: Scheduler always QUEUED in windows

2016-04-02 Thread narges Rezaei
thanks a lot . I did it , the project folder shou賲d be in "web2py" folder . my project was in pycharm folder . after then , i did "cd C:\Users\narges\web2py" and then start the web2py server with IDE and then "web2py.exe -K MyApp" in cmd. On Sun, Apr 3, 2016 at 9:46 AM, Dave S wrote: > On S

Re: [web2py] Re: Scheduler always QUEUED in windows

2016-04-02 Thread Dave S
On Saturday, April 2, 2016 at 9:44:53 PM UTC-7, narges Rezaei wrote: > > i use PyCharm for writing program and when it run ,web2py server will > start . i work in windows. > i open pycharm and create a web2py project. > thanks. > > Open a cmd.exe window ("DOS window"), and use the cd command to g

Re: [web2py] Re: Scheduler always QUEUED in windows

2016-04-02 Thread narges Rezaei
i use PyCharm for writing program and when it run ,web2py server will start . i work in windows. i open pycharm and create a web2py project. thanks. On Sun, Apr 3, 2016 at 9:08 AM, Dave S wrote: > > > On Saturday, April 2, 2016 at 5:25:35 AM UTC-7, narges Rezaei wrote: >> >> i did not use it , i

Re: [web2py] Re: scheduler trouble

2015-05-22 Thread Manuele Pesenti
Hi Niphlod, thanks for your replay. I solved my trouble switching the scheduler db connection that I forgot it was still using SQLite to PostgreSQL. Thanks to this change the task has performed 2778 run from yesterday evening without any problem. Best regards Manuekle Il 21/05/15 18:35, Niph

Re: [web2py] Re: Scheduler exception when setting immediate=True: 'Deadlock found when trying to get lock...'

2015-04-24 Thread Osman Masood
Nope...as proven earlier, this is a web2py timing issue. It's been occurring randomly in production for some time now. I have a try/except surrounding it, but the sucky part is that since the transaction fails, you lose all the commits in the whole request. On Friday, February 27, 2015 at 2:19:

Re: [web2py] Re: Scheduler exception when setting immediate=True: 'Deadlock found when trying to get lock...'

2015-02-27 Thread Michele Comitini
Try too see if in production there is a transaction that stays open for a long time. It could be a console left open somewhere? 2015-02-27 8:42 GMT+01:00 Osman Masood : > Right. The purpose of using the console was to simulate what actually > happens in production. > > On Thu, Feb 26, 2015 at 11

Re: [web2py] Re: Scheduler exception when setting immediate=True: 'Deadlock found when trying to get lock...'

2015-02-26 Thread Osman Masood
Right. The purpose of using the console was to simulate what actually happens in production. On Thu, Feb 26, 2015 at 11:39 PM, Niphlod wrote: > you know that on console, after queue_task() you need to commit(), right ? > If you leave the transaction hanging, no wonder that you're observing > dea

Re: [web2py] Re: Scheduler misleading DEBUG logging when task reaches timeout

2014-11-24 Thread Francisco Ribeiro
Niphlod, i have no expectations whatsoever and specially when it comes to undocumented features but merely reasonable hopes. Now, let me be clear here, I also don't expect software to be always properly documented and specially Open-Source where talented and busy people like yourself generously

Re: [web2py] Re: Scheduler misleading DEBUG logging when task reaches timeout

2014-11-24 Thread Francisco Ribeiro
Niphlod, i have no expectations whatsoever and specially when it comes to undocumented features but merely reasonable hopes. Now, let me be clear here, I also don't expect software to be always properly documented and specially Open-Source where talented and busy people like yourself generously

Re: [web2py] Re: Scheduler tasks won't run

2014-10-22 Thread Jim Steil
I think the problem was that I copied my production database over the top of my development db. Looks like my newer version of web2py has a new table called scheduler_task_deps that my production system doesn't yet have. Thanks for the time on create/migrate of the db tables. I removed the table

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread Niphlod
if it's a module yes, it's the whole reason of having a module not to reevaluate it at every time. If you're debugging, though, it should be a function. Mind that you can always prepare a simple script (i.e. mylaunch.py) and use web2py.py -M -S appname -R mylaunch.py mylaunch.py will be execute

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread Ant贸nio Ramos
using your suggestion web2py.py -M -S appname whenever i change my code i have to exit my shell console and run it again right? Regards 2014-10-15 10:03 GMT+01:00 Ant贸nio Ramos : > > 2014-10-14 23:06 GMT+01:00 Niphlod : > >> web2py.py -M -S appname > > > Niphold > You deserve a promotion too!!

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread Ant贸nio Ramos
2014-10-14 23:06 GMT+01:00 Niphlod : > web2py.py -M -S appname Niphold You deserve a promotion too!! thank you for your time. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Niphlod
yes. web2py.py -M -S appname On Tuesday, October 14, 2014 11:51:35 PM UTC+2, Ramos wrote: > > My need of a "Run now" was only to run the code of a task for debugging > purposes. > > when i麓m building a task i need to test the code as i write so i > repeatedly have to change the next run minut

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Ant贸nio Ramos
My need of a "Run now" was only to run the code of a task for debugging purposes. when i麓m building a task i need to test the code as i write so i repeatedly have to change the next run minute and wait like a sitting duck for it to happen. Is there a better way ? Thank you 2014-10-14 20:42

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Niphlod
I could say in the same manner "please queue a task without any parameters" to get it running right away, or "code your own button" In any case, we won't add such a button because you're missing the difference between a "function" and a "task". If you need to run a function "now", either queue it

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Ant贸nio Ramos
Please add a "Run Now" Button 2014-10-14 15:16 GMT+01:00 Ant贸nio Ramos : > ARG > > THANK YOU! > > 2014-10-14 15:02 GMT+01:00 Niphlod : > >> your next_run_time is one month ahead . >> >> On Tuesday, October 14, 2014 2:37:35 PM UTC+2, Ramos wrote: >>> >>> thank you >>> [image: Imagem inline

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Ant贸nio Ramos
ARG THANK YOU! 2014-10-14 15:02 GMT+01:00 Niphlod : > your next_run_time is one month ahead . > > On Tuesday, October 14, 2014 2:37:35 PM UTC+2, Ramos wrote: >> >> thank you >> [image: Imagem inline 1] >> >> 2014-10-14 13:23 GMT+01:00 Niphlod : >> >>> if you care to paste your current sc

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Niphlod
your next_run_time is one month ahead . On Tuesday, October 14, 2014 2:37:35 PM UTC+2, Ramos wrote: > > thank you > [image: Imagem inline 1] > > 2014-10-14 13:23 GMT+01:00 Niphlod >: > >> if you care to paste your current scheduler_task records, we can tell you >> what's preventing the task f

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-14 Thread Ant贸nio Ramos
thank you [image: Imagem inline 1] 2014-10-14 13:23 GMT+01:00 Niphlod : > if you care to paste your current scheduler_task records, we can tell you > what's preventing the task from being executed. > > > On Tuesday, October 14, 2014 1:17:59 PM UTC+2, Ramos wrote: >> >> Hello i have 2 tasks >> one

Re: [web2py] Re: scheduler not showing 1 task

2014-09-13 Thread Ant贸nio Ramos
Solved! Thank you 2014-09-12 21:45 GMT+01:00 Niphlod : > that's why you don't get a scheduler_run record then. > Directly from the book ( > http://web2py.com/books/default/chapter/29/04/the-core#Results-and-output) > > *Beware that if the task has no return values, it is removed from the > schedu

Re: [web2py] Re: scheduler not showing 1 task

2014-09-12 Thread Niphlod
that's why you don't get a scheduler_run record then. Directly from the book (http://web2py.com/books/default/chapter/29/04/the-core#Results-and-output) *Beware that if the task has no return values, it is removed from the scheduler_run table as soon as it is finished.* On Friday, September 12

Re: [web2py] Re: scheduler not showing 1 task

2014-09-12 Thread Ant贸nio Ramos
no, it does not return data 2014-09-12 20:18 GMT+01:00 Niphlod : > does the alertusers task return something ? > > > On Friday, September 12, 2014 12:33:22 PM UTC+2, Ramos wrote: >> >> I have 2 tasks queued but only only one is shown in the run table.The >> alertUsers task is running because it i

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Pardon me earlier messaeg. I copied wrong code. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc is

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
NP. I got another way to catch failed mail/task. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc i

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
no. On Thursday, August 28, 2014 10:26:42 AM UTC+2, Prasad Muley wrote: > > Okay. > I am using 2.3 . I can't upgrade it because Company decided to use 2.3 > only. > Is there anyway to access current task id in 2.3? > > > > On Thu, Aug 28, 2014 at 1:47 PM, Niphlod > > wrote: > >> what version ar

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Okay. I am using 2.3 . I can't upgrade it because Company decided to use 2.3 only. Is there anyway to access current task id in 2.3? On Thu, Aug 28, 2014 at 1:47 PM, Niphlod wrote: > what version are you using ?! W2P_TASK is available from 2.4.1. > > > On Thursday, August 28, 2014 9:30:28 AM U

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
what version are you using ?! W2P_TASK is available from 2.4.1. On Thursday, August 28, 2014 9:30:28 AM UTC+2, Prasad Muley wrote: > > Hi Niphlod, > I need to get current task's id. I saw your sample scheduler example > on niphlod_w2p_scheduler_tests >

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Hi Niphlod, I need to get current task's id. I saw your sample scheduler example on niphlod_w2p_scheduler_tests I did it in same way but got error. *#models/scheduler.py* def send_mail(to, subject, message, cc

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Niphlod
I'd strongly advise you to read the section on the book about migrations and fixing broke migrations. If you're starting now with the scheduler, please do the following: - delete all databases/*_scheduler_*.table files - delete scheduler_worker, scheduler_tasks, scheduler_run table from your back

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Prasad Muley
Hi, I tried to access db.scheduler_run table but it is giving me following error in web2py shell and app admin UI. *OperationalError: (1054, "Unknown column 'scheduler_run.scheduler_task' in 'field list'")* On Tue, Aug 26, 2014 at 1:04 PM, Niphlod wrote: > there's yet a scheduler_task table

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Prasad Muley
Thanks. It works. On Tue, Aug 26, 2014 at 1:04 PM, Niphlod wrote: > there's yet a scheduler_task table in the database. Fix migrations in the > usual way, or set Scheduler(db,,migrate=False) to avoid the error. > > > On Tuesday, August 26, 2014 8:58:06 AM UTC+2, Prasad Muley wrote: >> >> Hi

Re: [web2py] Re: scheduler: task concurrency

2014-05-03 Thread Niphlod
Sorry, I missed the general usecase scenario ... and come on, it's not that difficult to implement a wrapper with a "flags" table, even for a general approach... or an "update the first queued task named 'foo'" right at the end of the 'foo' function...it takes maybe 10 lines of code at best. Ac

Re: [web2py] Re: scheduler: task concurrency

2014-05-03 Thread Paolo Valleri
I knew there are bunch of different approaches to implement what I need, the one I prefer is to use enabled=False/True but by doing that we are moving that feature (in my view it belongs to the scheduler) in the function code. In that case, I have to reinvent the wheel, actually I have also to hard

Re: [web2py] Re: scheduler: task concurrency

2014-05-02 Thread Niphlod
What's the "general" use case ? There are a bunch of simple different things you can do right in the current scheduler to achieve that goal - schedule the same with different start_time(s) - queue the first with enabled=True and the following with enabled=False with a callback that flips the

Re: [web2py] Re: scheduler: task concurrency

2014-05-02 Thread Paolo Valleri
yes, the function name identifies the same task Paolo 2014-05-02 14:19 GMT+02:00 Niphlod : > how do you identify "the same task" ? the same function name ? > > > On Friday, May 2, 2014 12:19:53 PM UTC+2, Paolo Valleri wrote: > >> I don't think about arbitrary workflow, I would only avoid concu

Re: [web2py] Re: scheduler: task concurrency

2014-05-02 Thread Niphlod
how do you identify "the same task" ? the same function name ? On Friday, May 2, 2014 12:19:53 PM UTC+2, Paolo Valleri wrote: > > I don't think about arbitrary workflow, I would only avoid concurrent > execution of the same task. > > > Paolo > > > 2014-05-02 11:52 GMT+02:00 Niphlod >: > >> let's

Re: [web2py] Re: scheduler: task concurrency

2014-05-02 Thread Paolo Valleri
I don't think about arbitrary workflow, I would only avoid concurrent execution of the same task. Paolo 2014-05-02 11:52 GMT+02:00 Niphlod : > let's say that "parallel" is the default behaviour > when you need to run a task to avoid parallel (for speech sake, let's turn > to "concurrent"

Re: [web2py] Re: scheduler

2014-04-24 Thread Frank
On 24 Apr 2014 at 08:42:27, Niphlod (niph...@gmail.com) wrote: On Wednesday, April 23, 2014 10:53:01 PM UTC+2, ureal frank wrote: Hi Niphold, many thanks for your reply and valuable tips. On 23 Apr 2014 at 20:59:52, Niphlod (nip...@gmail.com) wrote: you're doing "all" wrong. Stop copy/pasting f

Re: [web2py] Re: scheduler

2014-04-24 Thread Niphlod
On Wednesday, April 23, 2014 10:53:01 PM UTC+2, ureal frank wrote: > > Hi Niphold, > > many thanks for your reply and valuable tips. > > On 23 Apr 2014 at 20:59:52, Niphlod (nip...@gmail.com ) > wrote: > > you're doing "all" wrong. Stop copy/pasting for a sec and take a look to > docs.it'll

Re: [web2py] Re: scheduler

2014-04-23 Thread Frank
Hi Niphold, many thanks for your reply and valuable tips. On 23 Apr 2014 at 20:59:52, Niphlod (niph...@gmail.com) wrote: you're doing "all" wrong. Stop copy/pasting for a sec and take a look to docs.it'll save you from multiple headaches. Despite my error, isn鈥檛 it normal doing some copy-pas

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-03 Thread Kiran Subbaraman
Ah, yes that is the point I missed from Anthony's post. Thanks for highlighting it Niphlod. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Thu, 03-04-2014 9:40 PM, Niphlod wrote: that is probably due

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-03 Thread Niphlod
that is probably due to the fact that you're calling "queue_task" inside a model, so you get a new queued task EVERY request that comes in. As said by Anthony, remove the "queue_task" bit from your model and put them in a controller, else queue the task from appadmin. On Thursday, April 3, 2014

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-02 Thread Anthony
When a task runs, it runs in the same environment as a controller, which means it runs your models. So, if you queue the tasks in a model, then whenever a task runs, it will end up queuing another version of itself. If you want to set these tasks to run repeatedly, then you only need to queue t

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-02 Thread Niphlod
heartbeat=20 just makes workers check if there are new task every 20 seconds (plus housecleaning etc). If tasks are ready to be processed, they're picked up and processed ASAP. if you want to queue A, than wait 20 seconds, run B, then wait 20 seconds, then run C, you need to adjust the start_ti

Re: [web2py] Re: Scheduler - clarification around heartbeat, and setting up tasks

2014-04-01 Thread Kiran Subbaraman
Anthony, Thanks for the explanation, helps me understand scheduler better. I will try the task configuration now. This is my scheduler and task definition: sched_db = DAL(...postgres...) scheduler = Scheduler(heartbeat=20) # Task A scheduler.que

Re: [web2py] Re: Scheduler: new plugin cs_plugin_monitor

2014-03-03 Thread Andrey K
similar thing http://www.jetbrains.com/pycharm/webhelp/remote-debugging.html On Saturday, March 16, 2013 7:25:14 PM UTC+3, Niphlod wrote: > > a little offtopic but http://pydev.org/manual_adv_remote_debugger.html > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

Re: [web2py] Re: Scheduler-related database tables created on sqLite but NOT on MySQL

2013-12-05 Thread Yassen Damyanov
Thanks, Massimo, that was it. Niphlod answered that in another thread and I just got the problem solved. Again, I would suggest showing the migration status somewhere in the application header of the db administration page, of that sounds reasonable and not hard to do. Would help to newcomers like

Re: [web2py] Re: Scheduler - a second try

2013-11-08 Thread Niphlod
the only thing is that only syslog-ng is multiprocess-safe, so the standard logging to file and/or console may incur in problems. On Friday, November 8, 2013 5:46:29 AM UTC+1, Jonathan Lundell wrote: > > On 7 Nov 2013, at 7:05 PM, Andrew W > > wrote: > > Thanks. I've never been quite sure what

Re: [web2py] Re: Scheduler documentation question

2013-11-08 Thread Johann Spies
Thanks. Please put that in the book. On 7 November 2013 15:22, Niphlod wrote: > that if you have multiple workers you can have them assigned a "multiple" > fraction of the work if you know that they'll process tasks faster. > i.e. you have a local worker fetching from the interwebs big chunks

Re: [web2py] Re: Scheduler - a second try

2013-11-08 Thread Johann Spies
Postgresql On 7 November 2013 15:16, Niphlod wrote: > what db are you using ? > > > On Thursday, November 7, 2013 12:07:40 PM UTC+1, Johann Spies wrote: >> >> It was a year ago that I have tried for 4 days to get the scheduler >> working. In the end I gave up and decided to use the operating s

Re: [web2py] Re: Scheduler - a second try

2013-11-07 Thread Jonathan Lundell
On 7 Nov 2013, at 9:00 PM, Andrew W wrote: > Well, I just added -D 0 when starting the scheduler and it prints to the > console. > Yes, we should add something, because after reading the logging sections of > the book I was sure I had to add something to the conf file. scheduler.py has this:

Re: [web2py] Re: Scheduler - a second try

2013-11-07 Thread Andrew W
Well, I just added -D 0 when starting the scheduler and it prints to the console. Yes, we should add something, because after reading the logging sections of the book I was sure I had to add something to the conf file. On Friday, November 8, 2013 3:46:29 PM UTC+11, Jonathan Lundell wrote: >

Re: [web2py] Re: Scheduler - a second try

2013-11-07 Thread Jonathan Lundell
On 7 Nov 2013, at 7:05 PM, Andrew W wrote: > Thanks. I've never been quite sure what to put in logging.conf for the > scheduler debug key, based on the "logger =" statement in scheduler.py. We should add a schedule section to the logging example file. -- Resources: - http://web2py.com - htt

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the mail-sending usecase is one of the most clearer to show why a web app might need an "outside processor" to do the work, and keep the webapp snappy. You can choose whatever method you like to schedule the task, all it needs is a record inserted into the scheduler_task table, with correct valu

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
complete the request in a second if I insert in queue. and not a minute* On Thursday 17 October 2013 12:45 AM, Niphlod wrote: the main point is not that is not inefficient by itself. It's just that you need to make sure you don't use that in a model because in web2py models are executed at **ev

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
I got your point. It is that I made the whole project, its running except for sending mails I need to run the mail_queue file manually , I want it to run ever hour or so , so that the mails are being received. so wanted to schedule the sending of mails once every hour and if the load increases ,

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the main point is not that is not inefficient by itself. It's just that you need to make sure you don't use that in a model because in web2py models are executed at **every** request, and you don't seem to want to queue a task for every request that comes in :-P On Wednesday, October 16, 2013 8

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar Tuteja
thanks a ton, I ll try this and what would be appropriate place to insert the file , so that it is not efficient. thanks, regards, Tushar Tuteja On 17 October 2013 00:22, Niphlod wrote: > the scheduler is running fine. > In the data you pasted here there's the reason why the scheduler isn't

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the scheduler is running fine. In the data you pasted here there's the reason why the scheduler isn't picking up any new task. times_run is 3 and repeats is set to 3, so the task got executed 3 times already. Sidenote: append a "return 1" to your function, so you'll get scheduler_run records ho

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
I started with that only, but it is still now working. SO I'll tell you what I did. I made a file sched.py *# coding: utf8** **def fun():** **import time** **print 'selecting mails'** **rows = db(db.queue.status=='pending').select()** **for row in rows:** **print 'sending m

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
ok. start it with python web2py.py -K appName -D 0 that sets to DEBUG the logging level Il giorno mercoled矛 16 ottobre 2013 14:46:53 UTC+2, Tushar Tuteja ha scritto: > > Ubuntu 12.04 > i use the command > python web2py.py -K appName > > On Wednesday 16 October 2013 05:53 PM, Niphlod wrote: >

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
Ubuntu 12.04 i use the command python web2py.py -K appName On Wednesday 16 October 2013 05:53 PM, Niphlod wrote: a) what ubuntu ? b) how do you start the scheduler ? Il giorno mercoled臎 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja ha scritto: Hey I am using web2py on ubuntu. I am

Re: [web2py] Re: Scheduler question

2013-10-04 Thread Pankaj Pathak
Dear All, I want help to send sms with attachment, But i didn't succeed.Please help me. *Pankaj Pathak* *Software Developer * *Shrideva Technomech Pvt. Ltd.* On Fri, Oct 4, 2013 at 9:24 PM, Niphlod wrote: > > > Il giorno venerd矛 4 ottobre 2013 11:31:33 UTC+2, Marin Pranji膰 ha scritto: > >>

Re: [web2py] Re: Scheduler question

2013-10-04 Thread Niphlod
Il giorno venerd矛 4 ottobre 2013 11:31:33 UTC+2, Marin Pranji膰 ha scritto: > > > > > On Wed, Oct 2, 2013 at 4:13 PM, Niphlod >wrote: > >> >> >> Il giorno mercoled矛 2 ottobre 2013 15:15:16 UTC+2, Marin Pranji膰 ha >> scritto: >> >>> Hi, >>> >>> I have a task queue that runs in the background. I wa

Re: [web2py] Re: Scheduler question

2013-10-04 Thread Marin Pranji膰
On Wed, Oct 2, 2013 at 4:13 PM, Niphlod wrote: > > > Il giorno mercoled矛 2 ottobre 2013 15:15:16 UTC+2, Marin Pranji膰 ha > scritto: > >> Hi, >> >> I have a task queue that runs in the background. I want to switch to >> scheduler because I need more workers. >> Queued tasks are long running (video

Re: [web2py] Re: Scheduler period

2013-08-03 Thread Niphlod
no probl. once you figure out that the scheduler is a queue processor, it's very easy to plan properly. You may want to rethink slightly differently your variables only if your "historical mindset" is with cron-like interfaces. On Saturday, August 3, 2013 7:23:23 PM UTC+2, Roberto Perdomo wrot

Re: [web2py] Re: Scheduler period

2013-08-03 Thread Roberto Perdomo
:-D Thanks Niphold, using repeats = 2 and no stop_time is the best solution. I did not realize that I could do it that way. Thanks again. Best regards. 2013/8/3 Niphlod > ok, explanation is clearer. Although scheduler was not meant to be > executing task on a precise-timing (its a queue proce

  1   2   3   >