Interpret daySpecification mask field values

Harlan (1 post)
July 19, 2021 11:55 AM
Accepted Answer

adTempus version 4.4

I'm trying to query job trigger information from adTempus SQL tables to help analyze the time dependencies between job tasks.

The daySpecification table has some mask fields that I need to get the actual weekdays from.

For instance I have a job with monthMask = 8190 and weekdayMask = 252. I know the job runs every month Mon, Tues, Wed, Thurs, Fri, Sat.

How do I get the months and days of the week from the mask field values?

Thanks

Bill Staff (601 posts)
July 19, 2021 05:02 PM
Accepted Answer

The best way to get this information is to find the corresponding class/property in the API documentation, which will have information on the values.

MonthMask is a bitmask with bits set for each selected month (bit 1 for January, bit 2 for February, etc.). So if February and April are selected, the mask is bit 2 (0x4) OR bit 4 (0x10) for a value of 0x14 = decimal 20. WeekdayMask works the same way, with 1 for Sunday through 7 for Saturday.

Replies are disabled for this topic.