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

Reminder

I am using VB. I have copied your code note for note into my code. When I run the code--
pAgent.HasIntervalElapsed(productcode)

it then asks "do you want to check for updates? Yes/No".
I am going to add a 3rd button -- Remind me in a week.
Is there a way to call another function, possibly
pAgent.SetScheduleInterval productcode, ndays to set liveupdate to not ask again for a week.
0 Kudos
(3) Replies
Chris_Woerner
Level 10

The answer is that it depends on which API you are using to check for updates.

SetScheduleInterval sets the scheduled interval for your product. Normally, it is set during the installation. You certainly could reset this value from your application (based on customer response).

Different APIs use/ don't use this the scheduled interval:

- AutoUpdate - ignores this value and checks everytime it is called
- DisplayMessage - ignores this value and checks everytime it is called
- DisplayScheduledMessages - uses interval to check every 'n' days
- HasIntervalElapsed - uses the interval and last check date to see if you should check for updates
- AppUpdate (AppStart)- checks for critical update each time it is called and used the schedule interval to check for optional updates every 'n' days.

Based on your posting, it seems you might be doing something like this....

HasIntervalElapsed
if yes
display message box (check or not)
if yes
run a check for updates
if no
reset interval based on "remind me again value"
if no
exit


That type of logic will work just fine.
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

I have my set schedule interval set to 7 days.
I check to see if interval has elapsed.
If it has I ask yes,no, remind me.
If they click remind me--
I run setschedule interval product code,7
But it still asks the next time I run the program.

Hasintervalelapsed rests to 0 after you check for an update
But it does not get reset to day 0 if you reset your setschedule interval.

Maybe I have to change the interval from 7 to 8 days? then reset it back to 7? not just reset it to 7.
0 Kudos
Chris_Woerner
Level 10

Your right.... we don't reset the 'last check date' when you do a HasIntervalElapsed. I forgot that important point. But there is a way around it.

If the customer choose to remind me later, you can read the existing interval using GetScheduledInterval. You would then add that value to the "remind me later" number of days. That sum should be used to reset the scheduled interval.

Sorry we are making this difficult for you. We should find a way to provide this type of functionality out of the box.
0 Kudos