创建文件,如没有则创建
~/Library/LaunchAgents/com.kinggoo.remoteWeeklyJob.plist
加入以下内容,每周六和周三的早4点执行
Label com.iie.weeklyJob ProgramArguments /var/spool/cron/rsync.cartoonAndnovelData_1.sh StartCalendarInterval Weekday 3 Hour 4 Minute 0 Weekday 6 Hour 4 Minute 0 StandardOutPath /tmp/weeklyjob.log StandardErrorPath /tmp/weeklyjoberr.log
载入计划任务
launchctl load ~/Library/LaunchAgents/com.kinggoo.remoteWeeklyJob.plist
如之前已经添加过,请unload撤销这个任务
launchctl unload ~/Library/LaunchAgents/com.kinggoo.remoteWeeklyJob.plist
- THE END -
很好,赞一个,加油!