cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CChong
Level 11 Flexeran
Level 11 Flexeran

Learn more on the 21st

My company plans to upload a "Learn More" message on the 21st of each month (not an update, just a message). How can I automatically display messages the first time the application is started on or after the 21st? If the user has already been given the opportunity to Learn More, we don't want to bother them again until the 21st of the next month.

If Update Service can't help me, I'm prepared to use brute force (i.e. the local system clock and a file indicating the last time messages were displayed). SetScheduleInterval() appears to be of little use since it works off of relative rather than absolute dates. For marketing purposes, we really want this to happen on the 21st rather than just every 30 days.


Rick LaMont
0 Kudos
(2) Replies
Chris_Woerner
Level 10

The Update Service displayscheduledupdates() was designed to spead the load of updates over a given timeperiod. You are trying to do the opposite. You want everyone to check on the 21st. The good news is that you can probably easily work around this. See if this combination of calls works for you...

---------
When your app starts, check the system clock.
if it is the 21st, call displaymessages()

if it is not the 21st,
call appupdate() to check for critical/ optional software updates

----------

There are a few other variations on this you could use depending on how often you want to check for actual software updates.
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

Regarding the poor design of my application, may I direct your attention to the word "marketing" :rolleyes:

As far as the brute force algorithm, it's more involved than just checking the system clock to see if it's the 21st. Suppose the 21st is a Saturday and the user doesn't login until Monday. Then we want to display messages on the 23rd. If the user runs the program 10 times on the 21st we only want to pester them once.

In any event it's working now. I'll spare you the implementation details.

Thanks,


Rick LaMont
0 Kudos