Time Based Application Restriction

MichaelNash
New Contributor II

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?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

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?

View solution in original post

4 REPLIES 4

mm2270
Legendary Contributor III

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
New Contributor II

Yes. Thank you.

lifelike
New Contributor

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.

brad
Contributor

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