If I have a rule that says "Don't do this if LIRU.AccessLevel='Janitor' "
How do I also exclude that rule when being run by a timed schedule process.
There is no concept of LIRU in that case, yet I need to add some condition to keep a rule from firing.
How to check (in a Rule) if a Scheduler job is running?
How to check (in a Rule) if a Scheduler job is running?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: How to check (in a Rule) if a Scheduler job is running?
This is not an answer but may send you in the direction of one.
When you use PROTECT and READ PROTECT you are able to exclude or include SYSTEM as an option, is there a way to identify that SYSTEM is invoking the rule?
When you use PROTECT and READ PROTECT you are able to exclude or include SYSTEM as an option, is there a way to identify that SYSTEM is invoking the rule?
Re: How to check (in a Rule) if a Scheduler job is running?
I have several scheduled email reminders that go out overnight and have set up some SystemSettings yes/no attributes that an admin can switch on or off at will
So the scheduled event starts with IF SystemSettings.SomeAttribute= 'Yes' AND [all the date/time parameters hold true] THEN
So the scheduled event starts with IF SystemSettings.SomeAttribute= 'Yes' AND [all the date/time parameters hold true] THEN
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Re: How to check (in a Rule) if a Scheduler job is running?
There is a LIRU for the system. It might be limited, but you can do the following:Jaymer wrote:If I have a rule that says "Don't do this if LIRU.AccessLevel='Janitor' "
How do I also exclude that rule when being run by a timed schedule process.
There is no concept of LIRU in that case, yet I need to add some condition to keep a rule from firing.
if LoggedInRegularUser.AccessLevel='System'
Bob
Re: How to check (in a Rule) if a Scheduler job is running?
BobK - perfect !!!!!BobK wrote:There is a LIRU for the system. It might be limited, but you can do the following:
if LoggedInRegularUser.AccessLevel='System'
thats exactly what I was needing.
Added that to many rules to keep them from running when not needed. Thanks so much!
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How to check (in a Rule) if a Scheduler job is running?
BTW... you should use ...
Because if you have other userBO's (for eg. ClientUser) then LoggedInRegularUser wont work if you have a LoggedInClientUser
Code: Select all
LoggedInSystemUser.AccessLevel = 'System'
V8.8 / Windows / MySQL
Re: How to check (in a Rule) if a Scheduler job is running?
You can certainly use LoggedInSystemUser.AccessLevel and that might even be the better option. But, I would guess that a process running from the scheduler would use the default user (RegularUser) instead of some other BO the system admin added to the SystemUser group.gernotlg wrote: ↑Thu Jan 11, 2024 3:35 pm BTW... you should use ...
Because if you have other userBO's (for eg. ClientUser) then LoggedInRegularUser wont work if you have a LoggedInClientUserCode: Select all
LoggedInSystemUser.AccessLevel = 'System'
Bob