Scheduling Rules in IDM v8
Now that SAP has declared that support will be either more expensive and/or harder to get with IDM v7.2 by the end of the year, the community is really ramping up into IDM v8. No doubt those that have upgraded are experiencing the new development environment, Eclipse. I can’t say I like it better or worse than the MMC. It’s just different but there are definitely a couple things I wish would have survived the transition.
For example, I can no longer right click in the destination tab of a job and select attributes that were retrieved from the SQL query in my source tab. When I’m reading from a custom table, that was something I used frequently. However, a big one that I recently discovered is that you can no longer add custom schedule rules via Eclipse. Wow! That’s a huge thing to lose! I mean, can anyone reading this think of a time when you worked in an environment where you DIDN’T write a custom schedule rule for a job? I’m super surprised that this functionality got cut. But, have no fear y’all! Custom schedule rules are still possible; you just have to write them directly into the database and then they’re selectable from jobs in Eclipse. You just have to know which two tables to write into and what the various columns in SQL need.
First table, mc_sched_rule, is where the new schedule rule will live. The RuleNo column is auto populated so don’t worry about that. The rest of the columns will determine how your rule works. You’ll need to write an INSERT INTO SQL query and specify which columns you want to populate. Some columns you’ll want to leave NULL depending on your needs but others you’ll need to fill in. Here’s what the columns mean and then you can write your own INSERT statement:
Name – This is what will show up on the pulldown menu in Eclipse when you select your new schedule rule on a job. Choose something short but descriptive, i.e. “Daily @ 2am”
Rule_Type – There’s only 3 options here. They can be viewed in the mc_sched_rules_names table but they are:
> 0 (zero), Frequency – Used for jobs that occur hourly, every 5 minutes, every 30 minutes, etc. all day, every day.
> 2, On Demand – You’ll probably never use this since you already have an On Demand rule.
> 10, Specific times – Used for once a week, twice a week, once a month, etc. This is probably the one you’ll use most often for custom schedule rules.
Description – The long description of your schedule rule, i.e. “Run every morning at 02:00.”
WeekDays – If you’re creating a rule to run on certain days of the week, this column will come into play. If you’re executing daily, like my 2am example, you’ll leave this NULL but if you want to run on Tuesdays and Thursdays, for example, you’ll actually put in a value of 20. This field is binary based. It uses an 8 bit binary format where the 8th bit is never used. After all, there’s only 7 days in a week. Starting from the right most digit, as is customary in binary, Sunday is the 1 value, Monday is the 2, Tuesday is the 4, Wednesday is the 8, Thursday is the 16, Friday is the 32 and Saturday is the 64. If you want to run on Fridays only, put in 32. Friday, Saturday and Sunday, add all three up and put in 97.
DayOfMonth – This is a bit easier. If you want to run on the 21st, put in 21. It does not appear possible to put in more than one day a month, like the 1st and 15th for example. If you figure out how to do something like this, please feel free to comment on your method.
RuleFlags – 5 appears to be for provisioning jobs (tasks) and jobs appear to use 11. I don’t think there are any other legal values but again, if you find something, please comment.
Next up, once you INSERT INTO the mc_sched_rule table, you need to add a line into the mc_sched_item table.
RuleNo – The number assigned to the custom rule you just created.
Frequency – If you’re doing a daily, at certain times schedule rule, put in the number of seconds between executions, i.e. 60 = every minute, 300 = every 5 minutes, etc. If you’re doing a daily or monthly rule, leave this NULL.
Sched_Time = How many seconds after midnight to execute on your designated day(s) or date, or up to how many seconds in the day to execute your frequency rule. If you have a frequency rule running every 10 minutes, for example, you put in 86399 here, the number of seconds in a day minus 1. I would guess if you put in a lesser number, your scheduled frequency would cut off when you hit that hour in the day and restart at midnight but I haven’t experimented with this. If you’re running a job on a certain day, again at 2am, you put in 7200… the number of seconds after midnight (2 hours) when you want your job to execute.
That should give you a pretty good head start on custom schedule rules in IDM v8. Questions? Additions? Comments? Please share so we all know what’s up! Thanks experts and I hope this saves someone some time someday. 🙂
"Eclipse is worse in most points" as an answer to your first topic. Yet, there's still development potential and I guess we'll see some of the features re-added in the next SPs.
There's more stuff that can be only or at least better be done in the DB than in Eclipse. Don't ask what we encountered during the migration, most of it is just too specific for "my" system.
Regarding the schedule rules: Either that or leave yourself some 7.2 database you can define the rules and then transfer them quite easily with copying between the tables. Luckily I don't need new ones by now so I haven't tried it out by now. Probably some diffrences in the columns but nothing that Excel or Notepad++ cannot handle.
I'm not totally prepared to agree that Eclipse is worse just yet. Off the cuff, I want to agree with you but I feel like that's more because I'm so used to the MMC that switching to Eclipse makes me not like Eclipse. I need time to get used to Eclipse and not dislike it just because it's different. Once I totally know Eclipse, then I can make a judgement on a level playing field.
I also understand why they switched to Eclipse. They needed something open source. The MMC required you to have at least one Microsoft box in your IDM environment while everything else could run on MS or Linux. Now, with Eclipse, you can run the whole environment in Linux if you choose. I guess time will tell and anyway, there's no turning back now so might as well get used to it.
I'm definitely not looking forward to that first migration I'm going to have to do someday. I've heard the horror stories. I honestly wish I had access to a post-migration IDM v8 environment so that I could see what the upgrade does and then I could better prepare myself for when the day come I have to do it but I doubt I'll have that chance.
Lastly, keeping v7.2 installed somewhere just so I can write schedule rules sounds like overkill but if it works for you, I'm absolutely not one to judge. The particular IDM environment I'm working in now is a brand new install, as in they've never had IDM before so we're starting fresh on v8. Thus, I don't have that option here.
Dear Mr. Bollin,
You saved my time.
Thanks you very much.
Thank you Mr Bollin for the clear instructions.
Is it possible to schedule SAP IDM jobs on Redwood BPA?
For those that don't want to bother with SQL and fiddling with the database -> https://www.linkedin.com/pulse/idm-scheduling-made-easy-todor-petrov/