Hello
I have a script that creates a bunch of cache variables from our AD that i later use on my applications.
It executes in around 2 minuets
I created a schedule that is executed in background every hour.
And it runs perfectly - it speed up page loading time a lot (i don’t have to read it form AD every time when its needed on application)
But here is the catch.
Sometimes i need to restart server or just PU itself (service).
And then i have to remember to manually trigger this script (or wait for full hour to run according to schedule)
I noticed that Schedule have cron expression setting - but how to set up it to run after PU has stared (with some delay for safety ?) in linux there is a @reboot expression for cron but im not sure it will work here
So is it achievable by cron in PU ?
If not, is there a chance to add this setting (to run after PU starts) to PU Schedule in future versions ?
As i said in this script i read bunch of data (mostly users account) and store them in cache variable
And basically its working those users ale in good variables.
But im able only to read default properties of those users (like Enabled,GivenName,Name,ObjectClass,ObjectGUID,SamAccountName,SID,Surname,UserPrincipalName)
But i want to read some other proprieties like mail, description and others
And it is not populated
When I add the same code to the app code - its working , on the scheduled script its not
im maybe doing sometime stupid mistakes but not that simple ones.
of course im using -Properties for Get-ADUser.
and the same line of code returns only default fields when executing from script and all wanted fields when launched from dashboard/page
if someone ask im using integrated environment for both script and dashboards
to the dashboard code, everything is working (i can read extended properties from both regular and svc users)
It was working that way for a long time but i decided to add some new variables (like groups etc) and it caused that dashboard loading time has increased.
But when its missing nothing works from extended properties (for both regular and svc users)
I made somewhere a mistake but i cant figure it out what it might be…