file = request.post_vars["myfile"]
        task = scheduler.queue_task(
                "task",
                task_name = "task_x",
                pvars={
                    'file': file ,
                },
                start_time = request.now + datetime.timedelta(seconds=50),  
#datetime
                stop_time = request.now + datetime.timedelta(seconds=70),
                timeout = 3600*3, #seconds
                prevent_drift=False,
                retry_failed = 3,
                period= 120,    #seconds
                immediate=False,
                repeats = 1)

How can I pass a file to  a task function? My task function needs to send a 
post request with the file

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to