Posted on 05-19-2011 10:45 AM
Is it possible to setup a custom trigger for a policy to run every 2 hours? I would like my computer naming script to run every 2 hours to verify computer names.
Thanks!
--
Matt Lee
FNG Sr. IT Analyst / Desktop Architecture Team / Apple S.M.E / JAMF Casper Administrator
Fox Networks Group
matthew.lee at fox.com<mailto:matthew.lee at fox.com>
Need Help? Call the Help Desk at (310) 969-HELP (ext 24357) or online at http://itteam<http://itteam/>
Help Desk Hours: Mon-Fri, 6AM-6PM PST
Posted on 05-19-2011 12:20 AM
You can create another schedule in Casper that would allow you to have a policy run every 2 hours.
Go to Settings->Management Framework Settings->Manage scheduled tasks
Bill Henkel
Computer Technician
Telephone Support Specialist
henkelb at westerntc.edu<mailto:henkelb at westerntc.edu>
608-789-6254
fax: 608-785-9287
Posted on 05-19-2011 11:06 AM
launchd scheduled task would do this
Posted on 05-19-2011 11:10 AM
I thought about that. Wonder if it would be too intrusive to run the script every 15 minutes. Our users love changing the Sharing Name.
--
Matt Lee
FNG Sr. IT Analyst / Desktop Architecture Team / Apple S.M.E / JAMF Casper Administrator
Fox Networks Group
matthew.lee at fox.com<mailto:matthew.lee at fox.com>
Need Help? Call the Help Desk at (310) 969-HELP (ext 24357) or online at http://itteam<http://itteam/>
Help Desk Hours: Mon-Fri, 6AM-6PM PST
Posted on 05-19-2011 11:29 AM
Something like this would do it
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.mycompany.rename</string> <key>ProgramArguments</key> <array> <string>/path/to/myscript.sh</string> </array> <key>RunAtLoad</key> <true/> <key>StartInterval</key> <integer>7200</integer> </dict> </plist>
Then just capture the full path in Composer, make sure it lives in /Library/LaunchDaemons and is owned by root:wheel. Then also in the same package capture your script and make sure it is executable and has proper ownership. Then when you deploy it, use the run command option in the advanced section of the policy and use launchctl to load your daemon after it is copied, use it with the -w option and it should load permanently. Then maybe in your script have it echo out to the system.log so you can verify it is working.
Posted on 05-24-2011 03:29 PM
I do not see "Manage scheduled tasks" when I browse there on v8.0. Is that a new feature?
Adil