Sverre, I think you must use your own application crontab, located at
applications/your_app/cron

I suggest you create a python script without any functions inside it,
to isolate your cron job, and put it in
applications/your_app/private/.
I do this here and it works nice.

Following my advice, your crontab would be like it:
*/2 * * * *     root  *applications/your_app/private/test_cron.py

And your test_cron.py will have no def inside it.

--
Vinicius Assef.



On Thu, Nov 4, 2010 at 8:10 AM, Sverre <[email protected]> wrote:
> My cron tab looking like this
>
> #crontab
> */2 * * * *     root  *sys/test_cron
> @hourly          root  *applications/mm/cron/expire_sessions.py
>
> but this doesn' work. My test cron function is
>
> from time import ctime
> def test_cron():
>    db.dbg.insert(dbgmsg=ctime())
>    db.commit()
>    return "ready"
>
>
> If I trigger this function manually it's working. Web2Py is installed
> as a Windows Service. Is someone able to help?
>
>
>
>
>
>

Reply via email to