Mac 設置自動執行定時任務, 步驟:
1. 編寫plist
2.將plist放入該目錄下
~/Library/LaunchAgents
3.命令啟動
添加: launchctl load /System/Library/LaunchAgents/com.test.plist 移除: launchctl unload /System/Library/LaunchAgents/com.test.plist 查看: launchctl list 立即執行任務:launchctl start com.aigo.launchctl.plist 停止執行任務:launchctl stop com.aigo.launchctl.plist
參考:
Mac執行定時任務之Launchctl
Mac創建定時任務
Mac中的定時任務利器:launchctl