Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduling Windows Mobile apps to run

How do you schedule a Windows Mobile application to periodically start up to perform some background processing. For example, assume I'm writing an email client and want to check for email every hour, regardless of whether my app is running at the time.

The app is a native C/C++ app on Windows Mobile 5.0 or later.

like image 774
Tim Norman Avatar asked Sep 07 '08 13:09

Tim Norman


1 Answers

the function you need is:

CeRunAppAtTime( appname, time )

that isn't the exact signature, there is also CeRunAppAtEvent, they should both be in the MSDN docs (but linking is useless the way MSDN urls always change)

The normal way to use these (and RunAppAtTime in the managed world via OpenNETCF.Win32.Notify ) is that for periodic execution, every time your app runs, it will rescedule itself for its next run-time.

If your app is running, the new instance should bring up the already running process. If it isn't running, then it is just like starting up normally - from mmory it passes some argument to the process so it can tell it is being scheduled and not started some other way.

like image 194
quick_dry Avatar answered Sep 21 '22 17:09

quick_dry