Another script that grew out of necessity. Trying to "encourage" users to restart their Macs at least once every 30 days to help with overall system performance, make sure all policies are installed, fix network related issues, etc. so I can with with this super simple Dialog notification that shows up once a week if they are in the "over 30 day uptime" smartgroup. Users don't have to restart, but if they do, you can set a custom timer to do an automatic restart for them. I used the AppleScript method of doing a restart so it will prompt the user to save their docs before a restart. Script can be found here: https://github.com/ScottEKendall/JAMF-Pro-Scripts/tree/main/UpTime
Regex I used to calculate 30+ days
And the script parameters...you can control the uptime days and timer value.