Mac 定时任务

Mac 执行定时任务

EDITOR=vim crontab -e
# 但是好像没生效,我日


cat ~/Library/LaunchAgents/com.gaops.plist
<?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.gaops.plist</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Users/ysicing/Projects/grcode/opencode/gaops/release.sh</string>
	</array>
	<key>StandardErrorPath</key>
	<string>/dev/null</string>
	<key>StandardOutPath</key>
	<string>/dev/null</string>
	<key>StartInterval</key>
	<integer>60</integer>
</dict>
</plist>

launchctl load -w com.gaops.plist
launchctl list | grep gao
*****
Written by ysicing on 05 November 2017