I think you need anacron for this. However, if you have Leopard and beyond "Leopard launchd will run skipped jobs when the machine is next awake." YMMV as I have not tested it actually does.
Is there a simple way of setting up a scheduled task on a Mac via the command line or a Bash script?
Reason I ask is, since we've moved to Mavericks our Macs have a very annoying habit of buggering up their disk permissions. Only admin users have permission to access the /Applications folder. This means that all standard users see is a long line of question marks along the dock and they can't run any other apps either.
Going into the disk utility and running Repair Permissions fixes this as does opening a terminal session and running "diskutil repairPermissions /" from a terminal session.
So what I'd like to is to set up a scheduled task via a bash script to run "diskutil repairPermissions /" every Monday morning at 9.00 and to run the task if it gets missed because the machine is off. I don't care if it uses cron or launchd just so long as it works! I've tried looking online but I find the documentation for both to be inscrutable.
Just as I was doing this today, the manual alternative is to use (Apple) Remote Desktop.
Select all machines.
Manage->Send Unix Command.
(or use the template)->SendCode:diskutil repairPermissions /
Once it's in your history you can just click retry.
It tells you if it succeeds or not
There are currently 1 users browsing this thread. (0 members and 1 guests)