I had the pleasure of creating and working with some "always up to date" applications on my Windows Mobile Device, and have tested some other manufacturer's products that do similar things. One thing I really hate is having to set peak times or configure when data transfers should occur in every application differently.
For some people, it may be beneficial to have mail syncing at a separate schedule than for something like phone-coordinate tracking, but sometimes it is nice to should be able to set those settings ONCE if I choose, and let all my software follow that one setting. For example, I often reset ActiveSync's schedule when I travel to avoid costly data transfers when I don't need to check my mail. I really hate when I get the bill the next month after I forget one app! Maybe allow the user to choose "follow activesync" or "use custom settings" or something like that if you need more precision than just M-F and a start/end time. For most of our customers, ActiveSync's schedule is exactly what they needed.
So, For all the developers out there making software that communicates over the air - I have posted some source code(below) that will tell you if the current time is "syncable" and if not, will tell you the next time when a transfer should be allowed.
For example:
if(FSSI.Mobile.ActiveSync.Settings.IsInPeak(DateTime.Now))
{
// Do something.
}
or, to check when the next sync time is (such as when planning when to wake the device to Sync....)
DateTime TimeToWake = DateTime.Now + new TimeSpan(60,0,0);
TimeToWake = FSSI.Mobile.ActiveSync.Settings.MakePeakTime(TimeToWake);
if(TimeToWake == DateTime.MaxValue)
{
// The sync settings say that no future days are valid (no sync days)
}
else
{
// TimeToWake is set to the next available Sync time on or after the passed in value.
}
Project Source and Demo Project: