For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > December 2005 > How do I schedule recurring event?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How do I schedule recurring event?
Joseph Geretz

2005-12-11, 4:12 am

I am using CeRunAppAtTime to schedule the execution of my program. I am
able to schedule a single event, but what I really need is to be able to
schedule an event for 2:00am every single day. How do I do this?

Also, please explain to me what the DayOfW parameter of the SYSTEMTIME
structure is for. I guess this can be used to specify an event schedule for
every Monday, for example? But how is this done? Do I leave Year, Month and
Date set to zero in order to specify such a recurring scendule? And what if
I simply want an event to recurr every day at a given time? Do I leave
everything set to zero except for hour and minute?

Thanks for your help.

- Joseph Geretz -


riki

2005-12-11, 4:12 am

Joseph Geretz wrote:
> I am using CeRunAppAtTime to schedule the execution of my program. I am
> able to schedule a single event, but what I really need is to be able to
> schedule an event for 2:00am every single day. How do I do this?

You'll just have to set a new event when the old one fires. Also you
*might* want to use
CeSetUserNotificationEx(NOTIFICATION_EVE
NT_TIME_CHANGE) to catch time
(zone) changes, depending on your use case.

> Also, please explain to me what the DayOfW parameter of the SYSTEMTIME
> structure is for. I guess this can be used to specify an event schedule for
> every Monday, for example? But how is this done? Do I leave Year, Month and
> Date set to zero in order to specify such a recurring scendule? And what if
> I simply want an event to recurr every day at a given time? Do I leave
> everything set to zero except for hour and minute?


SYSTIMETIME is just a datatype which CE uses for a SINGLE time, not a
series. DayOfW would be filled out by the system when you query the
time. Commonly used with GetSystemTime().

Riki

If a turtle doesn't have a shell, is he homeless or naked?
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support
riki

2005-12-11, 4:13 am

riki wrote:[color=darkred]
> Joseph Geretz wrote:
>

On second thoughts try using CeSetUserNotificationEx(CNT_PERIOD)

riki

Rumor has it that slugs drown in beer. Another rumour has it that slugs
spread this rumor.
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support
Joseph Geretz

2005-12-11, 7:22 pm

OK, thanks riki,

I'm looking at CeSetUserNotificationEx. One follow-up question, if I may.
How do I cancel any sceduled events for my application? Also, if the user
uninstalled the application, would scheduled avents be cancelled
automatically, or do I need to take care of this explicitly, myself?

Thanks,

- Joe Geretz -

"riki" <see_my_home@page> wrote in message
news:%23q7wBhj$FHA.2708@TK2MSFTNGP12.phx.gbl...
> riki wrote:
>
> On second thoughts try using CeSetUserNotificationEx(CNT_PERIOD)
>
> riki
>
> Rumor has it that slugs drown in beer. Another rumour has it that slugs
> spread this rumor.
> ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
> AbstractStart for Smartphone :
> http://homepages.inspire.net.nz/~gambit/AbstractStart/
> Latest Betas have WM5 layout and speed dial support



riki

2005-12-11, 7:22 pm

Joseph Geretz wrote:
> OK, thanks riki,
>
> I'm looking at CeSetUserNotificationEx. One follow-up question, if I may.
> How do I cancel any sceduled events for my application? Also, if the user
> uninstalled the application, would scheduled avents be cancelled
> automatically, or do I need to take care of this explicitly, myself?


you can iterate though the notifications using
CeGetUserNotificationHandles()/CeGetUserNotification() then call
CeClearUserNotification() when you find the one you want to delete.

riki

I poured beer on my lawn and it came up half cut!
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com