Recurring Advertisements

Patch My Pc | install & update thousands of apps

We all know (or will now) that if a client misses a mandatory advertisement in ConfigMgr for whatever reason, e.g., the client is powered off, it will happily “run” the advertisement as soon as it can once it comes online again.

Similarly, if a client receives an advertisement with a schedule in the past the client will “run” the advertisement as soon as it can. But what happens when the advertisement has a recurring schedule? I rarely use them, but every once in a while, behavior for this scenario is queried on the forums or at a client.

Test #1 Set up

A simple batch file that appends the time and date to a text file:

echo %date% %time% >> c:RecurrenceTest.txt

I advertised this to a client and set a mandatory recurring schedule of every 15 minutes.

The Result

Here are the contents of the output file:

Thu 09/09/2010 15:31:00.53
Thu 09/09/2010 15:46:00.53
Thu 09/09/2010 16:01:00.54
Thu 09/09/2010 16:16:00.54
Thu 09/09/2010 16:52:06.38

Thu 09/09/2010 17:00:00.19
Thu 09/09/2010 17:15:00.21
Thu 09/09/2010 17:31:00.53
Thu 09/09/2010 17:46:00.48
Thu 09/09/2010 18:01:00.49
Thu 09/09/2010 19:07:16.15

Thu 09/09/2010 19:16:00.54
Thu 09/09/2010 19:31:00.48

Note that there are two highlighted breaks above: the first was an OS power down and the second was a VM pause.

The first observation is that the client does “catch-up” a single recurrence of the advertisement — but only a single recurrence. This catch-up is out of band meaning that it doesn’t occur on the 15-minute mark. It occurs as soon as the client realizes that it missed an occurrence.

My second observation is that when I was logged out of the client after the power-up, the occurrence happened one minute sooner. This is because I had a one-minute countdown set on the advertisement but this one-minute countdown is only applicable when a user is actually logged into the system. As soon as I logged back in, the one minute offset returns.

Test #2 Set up

Same as above with a different VM added to the same collection using the same advertisement which has a start date in the past.

The Result

Here are the contents of the output file:

Thu 09/09/2010 18:07:45.23
Thu 09/09/2010 18:16:00.89
Thu 09/09/2010 18:31:02.65
Thu 09/09/2010 18:46:01.17
Thu 09/09/2010 19:01:02.42
Thu 09/09/2010 19:16:00.89
Thu 09/09/2010 20:07:19.60

Thu 09/09/2010 20:15:00.45
Thu 09/09/2010 20:30:01.79
Thu 09/09/2010 20:46:02.40
Thu 09/09/2010 22:05:27.29

Thu 09/09/2010 22:16:00.28
Thu 09/09/2010 22:31:01.72
Thu 09/09/2010 22:46:04.04
Thu 09/09/2010 23:01:04.05

Same results here with the two gaps highlighted in yellow: the first one being an OS shutdown and startup and the second one being a VM pause. The only thing different here is the initial catch-up highlighted in blue — this happened because the start-time of the recurrence pattern was before the client received the advertisement and was thus in the past.

One other quick note, these catch-up executions of the advertisement look exactly the same as other executions in the logs so there will not really be a way to tell them apart except by closely comparing their execution times.

Conclusion

Clients will always execute missed advertisements including a single occurrence of an advertisement with a recurring schedule.

3 thoughts on “Recurring Advertisements

  1. I know this is a very old post, but this behavior is messing with one of our deployments.
    This deployment is set to trigger everyday at 4pm and to rerun if failed. It can also be triggerred manually from Software Center outside of this schedule.

    I was wondering if there is a possibility to just skip missed advertisements. Or is it possible to detect if the deployment was triggered manually from Software Center versus when it was triggered automatically?
    Thanks for any help in advance!

    Greetings
    Krish

    1. No, there’s no direct way to skip a missed occurrence, you could add some detection method into whatever you are running so that it only runs when the detection is successful. This could be based on time if that’s your preference. For preventing execution for software center, just hide it from software center.

Leave a Reply

Your email address will not be published. Required fields are marked *

  +  23  =  26

Proudly powered by WordPress | Theme: Wanderz Blog by Crimson Themes.