SecondSonConsulting / Renew

A macOS script to encourage users to restart their workstations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More aggressive nag post Aggro message dismissal

fogdogit-paul-s opened this issue · comments

(me again, mightve got more than you bargined for in terms of beta testing!)

Have been conferring with my colleague @techtherapy and we both agree that we'd like to see end users be much more aggressively nagged if they dismiss the Aggro message and then cancel out of the restart dialog. The goal here is to make it so unpleasant that they restart to get rid of us!

I am aware that the script is currently called via a LaunchAgent, which in your config fires ever 15 and 45th minute of the hours (my intention is to actually change this to a discreet time, was going to submit a seperate question about this, but If we keep your setup, doesnt the script fire randomly based on install time - would want for example to instead prompt user toward end of workday).

Irrespective of the LaunchAgent interval, it would be nice to have the ability to set a much more frequent launch schedule (ever 5 mins for example), if the above situation (escaping out of system restart dialog) occurs. So essentially end user either has to see the box every 5 mins for eternity, or restart!

Ive given this some consideration, and I am going to decline supporting any alternate scheduling options.

You can accomplish your goal by using an alternate LaunchAgent utilizing any interval or logic you might want. If you want 5 minutes between launches, you can simplify your life by using StartInterval in your LaunchAgent. The script already supports being called as often as you see fit.

Everything you need to know about creating a LaunchAgent can be found here: https://www.launchd.info/

As far as your other comment, the time that the Renew PKG was run should have no effect on the built in LaunchAgent, which uses the StartCalendarInterval launchd option. It will run on the 15 and 45 of every hour based on the local computer's clock.

I will commit to making a separate PKG with no LaunchAgent when the official release comes (soon I hope.) This means you'll have a pkg of the latest script version that won't unload/destroy your custom LaunchAgents.

Thanks for this response and for the excellent launchd resource.

I will do some testing on this and revert with any questions!