I suggest you write a service to handle this. Also, why does it require a restart?
If however you must use task scheduler, try it like this:
schtasks /create /SC DAILY /TN AppName /TR AppExecutablePath /ST 0
0:00 /ET TIMEFORENDTASK
You can simply type this in a batch script and run the batch script when the user is installing the app, then put this in the uninstall batch script:
schtasks /delete /TN AppName