I'm running a very small (basically a test) newsletter from my os x server system... CRON is deprecated in os x server, should I use launchd or still try to use CRON?
The cron script (scheduled.php) needs to be executed by cron every 5 minutes, if you have other ways to execute this script every 5 minutes, you can do so.
We need to make a .plist file, like so. In this example, the .plist file would be called com.myhost.sendy.plist, and a real path to scheduled.php is required
Comments
Hi David,
The cron script (scheduled.php) needs to be executed by cron every 5 minutes, if you have other ways to execute this script every 5 minutes, you can do so.
Thanks.
Best regards,
Ben
David, if you figure out how, please post it on the forum, I've tried w/o luck!
Thanks,
Isaac
Isaac, worked something out.
We need to make a .plist file, like so. In this example, the .plist file would be called com.myhost.sendy.plist, and a real path to scheduled.php is required
This file needs to be moved to /Library/LaunchDaemons
Then:
sudo launchctl load -w /Library/LaunchDaemons/com.myhost.sendy.plist
One can see if it's loaded:
sudo launchctl list | grep sendy
Hope this helps... it seems to work, and I would appreciate any comments from others on the viability of this.