mac定時任務的開啓:bash
Last login: Tue Aug 13 22:49:54 on ttys004
(base) localhost:~ ligaijiang$ sudo launchctl list | grep cron
Password:
- 0 com.vix.cron
(base) localhost:~ ligaijiang$ sudo /usr/sbin/cron start
(base) localhost:~ ligaijiang$ sudo launchctl list | grep cron
- 0 com.vix.cron
(base) localhost:~ ligaijiang$ LaunchAgents sudo launchctl list | grep cron
-bash: LaunchAgents: command not found
(base) localhost:~ ligaijiang$ LaunchAgents ll /etc/crontab
-bash: LaunchAgents: command not found
(base) localhost:~ ligaijiang$ sudo touch /etc/crontab
(base) localhost:~ ligaijiang$ LaunchAgents ll /etc/crontab
-bash: LaunchAgents: command not found
(base) localhost:~ ligaijiang$ LaunchAgents sudo launchctl list | grep cron
-bash: LaunchAgents: command not found
(base) localhost:~ ligaijiang$ sudo launchctl list | grep cron
- 1 com.vix.cron
(base) localhost:~ ligaijiang$ LaunchAgents ll /etc/crontab
-bash: LaunchAgents: command not found
(base) localhost:~ ligaijiang$ ls: /etc/crontab
-bash: ls:: command not found
(base) localhost:~ ligaijiang$ sudo /usr/sbin/cron start
cron: cron already running, pid: 75237
(base) localhost:~ ligaijiang$
Jenkins配置定時任務,例如:ui
如下表示每5分鐘自動構建一次spa
Poll SCM:定時檢查源碼變動,若是有更新就checkout最新code下來,而後執行構建動做。3d
若是沒有更新就不會執行構建code
Build periodically:週期進行項目構建(源碼是否發生變化沒有關係)blog
因此若是沒有配GIT或SVN的話,週期執行就用Build periodicallycrontab