Yes, I guess I presumed everybody is familiar with unix separators as well as windows ones. I'll extend the examples with some notes about this for now. The problem with the port issue is that there is technically no port when you're executing a cron task - it's a script (just as if you started it from the command line). I don't know if you can find out the 'real' port and address from there (as you're in a separate process), that would be a question for Massimo.
On Mar 9, 3:32 pm, Iceberg <iceb...@21cn.com> wrote: > On Mar9, 7:17pm, AchipA <attila.cs...@gmail.com> wrote: > > > On Mar 9, 8:22 am, Iceberg <iceb...@21cn.com> wrote: > > > > 1. In the crontab file, usually we write > > > #0-59/1 * * * * root > > > /path/to/some/executable_file > > > But I found that, on Windows platform, "/" are not recognized as a > > > path separater, but a command line switch prefix. Not what we want. So > > > it would better that crontab file can use "/" as path separater on > > > both Linux and Windows, perhaps more other platforms. > > > Mixed emotions on this one. Obviously it would be good if we could > > keep syntax regardless of platform, but I'm afraid making such > > conversions can actually result in problems if someone *really* wants/ > > needs to use "/" (say, dir /s \dir\to\list > c:\temp\file). Switching > > separators can be very tricky when it comes to shell execution. > > Your concern is reasonable. So we can make a conclusion here: If you > want your crontab to be platform independent, do NOT use the "/path/to/ > some/executable_file" approach, but use "*applications/myapp/cron/ > myscript.py" approach. Maybe this statement should appear at the > beginning of applications/welcome/cron/crontab as a warning. > > > As for the address, what's your web server setup ? Just plain web2py > > (and on what port), do you have apache/IIS in the mix, too ? > > I only run web2py_win.zip itself by "web2py.exe -a1 -p80", without any > apache/IIS etc. Depends on the "-p" switch, port might be chosen to > something other than 80. Now the little problem is that, in myapp/cron/ > trigger.py, I can not find a way to automatically detect which port > the main web2py thread is running at. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---