Skip to main content
Solved

Time Based Application Restriction

  • January 31, 2014
  • 4 replies
  • 29 views

MichaelNash
Forum|alt.badge.img+4

I’m looking for a solution to prevent the Messages application from launching between 7:50 am to 2:15 pm Monday through Friday. What is the best solution?

Best answer by mm2270

You won't be able to do this using the built in Casper Suite Restricted Software function. That runs all the time and has no ability to set timeframes.
But you could create your own similar process following the same idea, which is a LaunchDaemon that runs every 15 seconds. But in the script, have it check the system time, and if it falls into the range of when Messages shouldn't be running, have it kill the app if it finds it in the process list, and send up a message similar to the one Restricted Software uses, with jamfHelper or whatever messaging tool you feel comfortable with. If the time it outside of the restricted range, just exit, or log something to a fuel and exit with no action taken.

Does that help?

4 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • Answer
  • January 31, 2014

You won't be able to do this using the built in Casper Suite Restricted Software function. That runs all the time and has no ability to set timeframes.
But you could create your own similar process following the same idea, which is a LaunchDaemon that runs every 15 seconds. But in the script, have it check the system time, and if it falls into the range of when Messages shouldn't be running, have it kill the app if it finds it in the process list, and send up a message similar to the one Restricted Software uses, with jamfHelper or whatever messaging tool you feel comfortable with. If the time it outside of the restricted range, just exit, or log something to a fuel and exit with no action taken.

Does that help?


MichaelNash
Forum|alt.badge.img+4
  • Author
  • New Contributor
  • March 11, 2014

Yes. Thank you.


Forum|alt.badge.img+3
  • New Contributor
  • March 11, 2014

Or you could use two policies, one that runs at around 7:50am and the other runs at around 2:15. The first policy runs a script that checks to see if Messages is running (similar to what mm2270 suggests), quits it if it is, then either changes execution permissions or altogether hides Messages. Then the 2:15 policy undos the first policy.


Forum|alt.badge.img+15
  • Contributor
  • March 13, 2014

We are looking into something like this to restrict some of our generic accounts. How much load would a LaunchDaemon running every 15 seconds put on the system? Would the end user even notice?

Thanks!

Brad