Please read the Scheduler documentation:
http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler.
Your second line should be something like:
scheduler = Scheduler(db, ...)
otherwise, you will have no way to refer to the Scheduler object later in your code when you want to schedule a task.
Just make sure function1 and function2 have been defined (or imported from a module) before the above lines. If for some reason you need to define one of the functions later, note that the second argument to Scheduler() is optional (i.e., you don't have to provide a dictionary mapping task names to functions -- you can instead pass a function directly to scheduler.queue_task when you actually queue a task). I think you can also update the task dictionary at a later point:
scheduler.tasks.update('new_task'=new_function)
Anthony