Good question. Ideally, I'd like (to be able to tell) web2py to issue
the ticket itself. The alternative, reading back a trace from cron's
stderr and inserting that as a ticket is ugly as hell. Any particular
reason you're not creating tickets when called from the command line ?

On Apr 8, 3:16 pm, mdipierro <[email protected]> wrote:
> That is OK. For now you have to commit manually. It may be possible to
> change this behaviour in the future but it requires more thought. For
> example, what happens if a cron fails? Should a ticket be issue?
>
> Massimo
>
> On Apr 8, 3:12 am, AchipA <[email protected]> wrote:
>
> > Massimo, can you comment on this ? The cron module cannot commit the
> > database (as it knows nothing about it and lives in a different
> > process), so if this really is the case for all database engines
> > that's a bit of snag.
>
> > On Apr 7, 8:04 pm, seth <[email protected]> wrote:
>
> > > Just a couple more data points in case they are useful.
>
> > > The -R was indeed unnecessary in the crontab, but it doesn't seem to
> > > be the cause of the problem, as db.commit() is still required in order
> > > to successfully insert into the database. Also, running the web2py
> > > shell (-M -S appname) also requires a db.commit() in order to update
> > > the db.
>
> > > Thanks again,
> > > -Seth
>
> > > On Apr 4, 8:23 am, mdipierro <[email protected]> wrote:
>
> > > > The -R may be causing the problem. Running scripts instead of action
> > > > requires manual committing the db.
>
> > > > On Apr 4, 5:40 am, AchipA <[email protected]> wrote:
>
> > > > > BTW Just out of curiosity, why are you calling -R ...test.py in your
> > > > > crontab ? It looks fairly redundant to me (you should call it within
> > > > > appname'scron/crontab).
>
> > > > > 0-59/1 * * * * cd /Users/username/Desktop/appname/web2py && python
> > > > > web2py.py -R applications/appname/controllers/test.py -C -D 1 >> /tmp/
> > > > >cron.output 2>&1
>
> > > > > On Apr 3, 1:29 am, seth <[email protected]> wrote:
>
> > > > > > I'm having trouble doing a db.table.insert from anexternalcronon
> > > > > > macosx.
>
> > > > > > The systemcronfile
>
> > > > > > 0-59/1 * * * * cd /Users/username/Desktop/appname/web2py && python
> > > > > > web2py.py -R applications/appname/controllers/test.py -C -D 1 >> 
> > > > > > /tmp/
> > > > > >cron.output 2>&1
>
> > > > > > The crontab file in appname/crondirectory
>
> > > > > > */10    *       *       *       *       root *test/callcron
>
> > > > > > I can see the callcron method is successfully being called every ten
> > > > > > minutes from thecron.output file.
>
> > > > > > But, incron.output I get the following error
> > > > > > WARNING:root:unable to import dbhash
>
> > > > > > and none of the db.table.inserts put anything in the database.
> > > > > > Although, when I hit the controller/action via the URL everything
> > > > > > works fine and I get entries in the database.
>
> > > > > > I've also tried the -S appname and -M switches, with no changes.
>
> > > > > > I've followed the following posts
>
> > > > > >http://groups.google.com/group/web2py/browse_thread/thread/cfe89bfa9d...
>
> > > > > > and
>
> > > > > >http://groups.google.com/group/web2py/browse_thread/thread/9acf0aae73...
>
> > > > > > with the same results.
>
> > > > > > I'm new to web2py so I may be missing something obvious :)
>
> > > > > > Thanks in advance,
> > > > > > -Seth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to