Soldato
- Joined
- 19 Dec 2006
- Posts
- 9,262
- Location
- Saudi Arabia né Donegal
Hi All,
Kinda new to Macs so forgive me if I'm not entirely up to speed on how everything works.
I'm currently attempting to schedule a command (test2.command) to run every hour. I've tried this through the use of cronjobs and LaunchD, neither of which appears to be successful.
My crontab looks like this:
*/60 * * * * admin /Users/admin/Desktop/test2.commmand (there's tabs between each of these, I just can't figure out how to get them to work here).
My .plist looks like this:
<?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>test2</string>
<key>UserName</key>
<string>admin</string>
<key>Program</key>
<string>/Users/admin/Desktop/test2.command</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>60</integer>
</dict>
<key>Debug</key>
<false/>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
Neither option appears to have worked though I know the base script does what it's meant to do and it's set as executable with all the correct read/write attributes.
I'd very much appreciate any pointers anyone would have.
Note: I did try with iCal and, while it works, it's a bit on the messy side. Plus, I'd rather get one of these options working for future projects.
Kinda new to Macs so forgive me if I'm not entirely up to speed on how everything works.
I'm currently attempting to schedule a command (test2.command) to run every hour. I've tried this through the use of cronjobs and LaunchD, neither of which appears to be successful.
My crontab looks like this:
*/60 * * * * admin /Users/admin/Desktop/test2.commmand (there's tabs between each of these, I just can't figure out how to get them to work here).
My .plist looks like this:
<?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>test2</string>
<key>UserName</key>
<string>admin</string>
<key>Program</key>
<string>/Users/admin/Desktop/test2.command</string>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>60</integer>
</dict>
<key>Debug</key>
<false/>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
Neither option appears to have worked though I know the base script does what it's meant to do and it's set as executable with all the correct read/write attributes.
I'd very much appreciate any pointers anyone would have.
Note: I did try with iCal and, while it works, it's a bit on the messy side. Plus, I'd rather get one of these options working for future projects.