Skip to main content
Question

Timed Application Restrictions

  • February 18, 2019
  • 1 reply
  • 19 views

Forum|alt.badge.img+4

Is it possible to restrict applications for a period of time ? Ideally we could prevent iMessages from working from 8am until 2:30pm. Is there a script that can block an app then allow the app based on time ?

Thanks

Carl Campion
Archmere Academy

1 reply

Forum|alt.badge.img+4
  • Contributor
  • February 18, 2019

Hi, I think, this solution could help you a bit:

  1. create an Extension Attribute which aims to a self-created plist like "my.company.restricted.app.plist" with true/false
  2. create a policy which runs in specific times (morning/evening) once every day (recurring checkin), executes a script, in which you set the value you need, and runs a recon afterwards
#!/bin/shell
# example !
defaults write /Library/../../my.company.restriced.app.plist RestrictApp -bool true
  1. Create a smartgroup for the Extension Attribute
  2. create a restricted Software entry for with your recently generated smartgroup in scope
  3. create another policy with a script, which sets the value of the plist back to normal and runs the recon afterwards again
#!/bin/sh
# example! 
dafaults write /Library/../../my.company.restriced.app.plist RestrictApp -bool false

OR

#!/bin/sh
# example! 
defaults delete /Library/../../my.company.restriced.app.plist RestrictApp