On Jan 3, 2011, at 9:20 AM, mdipierro wrote: > > Yes they can. They should all run from the main web2py folder (do not > use os.chdir(...)!)
Digression: I'd like to fix that eventually. It's not so bad to require the cwd to be web2py for startup, but it shouldn't matter after that. > the only issue is that cron jobs do not have access to stdout so they > cannot print. > You can use the logging module or print to a file. That can be true of web2py in general. stdout is the console when web2py is run from the command line, but in general (especially when it's started from a system-startup rc file) there's no telling what stdout is--if indeed it's anything at all. > > Massimo > > On Jan 3, 11:17 am, Christopher Blunt <blunt.christop...@gmail.com> > wrote: >> Hi, >> Can scripts invoked via cron have access to the local file system? >> >> As a test I created a script that I wish to run (via hardcron) every 5 >> minutes that will dump out test data to a file. The script seems to be >> invoked by web2py cron thread but no output file is created? >> >> Also, can a controller or model access the local file system? >> >> BRGDS, >> Chris >> p.s. I've only just started to use Web2py so sorry if these seem silly >> questions