On Jul 1, 2011, at 8:18 AM, Ross Peoples wrote: > I just tried the following by running web2py -S app -M -R my_script.py (since > this is how I run the script from cron): > > from gluon.settings import global_settings > print global_settings > > The cronjob value seems to always be False and I can't figure out how this > actually gets set to True. Any ideas?
web2py-initiated cronjobs add the flag -J (equivalent to --cronjob); that's what sets the flag. So if you want to trigger one yourself, set that flag. Look for 'cronjob' in gluon.widgets.py to get an idea what it's used for.

