Working with ReplicationSchedule.RawSchedule

Reading Time: 2 minutes

(System.DirectoryServices.ActiveDirectory.ReplicationConnection.ReplicationSchedule.RawSchedule)

This is an interesting property, you know the schedule screen you see in Site And Services  and which the new DFSR MMC will also have? Well this is how its built 🙂 ReplicationSchedule has a property called RawSchedule which is a Boolean datatype, but it’s a three dimentional array i.e. Boolean(,,) strange structure but here is how it contains information.

In the debugger it shows valuas as (0,0,0) true translated one can change that to:

The thread 0x19f4 has exited with code 0 (0x0).

Day:0

Hour:0False,False,False,False,

Hour:1False,False,False,False,

Hour:2True,False,False,False,

Hour:3True,False,False,False,

Hour:4True,False,False,False,

Hour:5True,False,False,False,

Hour:6True,False,False,False,

Hour:7True,False,False,False,

Hour:8True,False,False,False,

Hour:9True,False,False,False,

Hour:10True,False,False,False,

Hour:11True,False,False,False,

Hour:12True,False,False,False,

Hour:13True,False,False,False,

Hour:14True,False,False,False,

Hour:15True,False,False,False,

Hour:16True,False,False,False,

Hour:17True,False,False,False,

Hour:18True,False,False,False,

Hour:19True,False,False,False,

Hour:20True,False,False,False,

Hour:21True,False,False,False,

Hour:22True,False,False,False,

Hour:23True,False,False,False,

 

As you can see we have a lot of information here, we have a day of the week (Day 0 = Sunday) then we have the hour of the day (even though I* calculated that and I will show you how) then we have 4 segments of Boolean values (True,False,False,False) these are a single hour (60 minute) segment divided into 15 minute intervals. Those of you screaming 15 minute intervals OH NO remember with DFSR you now have the granuality of spliting replication scheduals into 15 minute fragments.

So lets look at 12am on Sunday and see when replication is schedualed Hour:0False,False,False,False,

If we look here on Sunday at 12am there is no replication at all, however if we look at 7am on Sunday Hour:7True,False,False,False, You can see for the first 15 minutes of 7am on Sunday replication will be taking place.

Pretty cool huh, just another reason why .net 2.0 rocks! I will soon post how to build a visible representation of the data above. For those of you that have been following my posts, I am busy building this into Network Explorer.

For now you all have a great day!

*please note that Joao Paulo Carreiro helped me with decoding this, he is truly one of the best programmers I have ever known (his blog is in Portugese)!

C