Linux Bash shell 腳本定時器 All In One
自動化執行定時任務
Linux crontab 是用來定期執行程序的命令
demos
$ crontab -e
# 定時器任務test
# 每隔 30 分鍾運行一次,使用 sh 自動安裝 app-node-env
# 30 * * * * sh ./auto-install-npm.sh
30 * * * * /bin/sh ./auto-install-npm.sh
#!/bin/sh
# sh/zsh/bash 選擇默認
# echo "🚀 linux shell 定時器" && npm i -g app-node-env
echo "🚀 linux shell 定時器" && yarn global add app-node-env
# Linux Bash shell 腳本定時器 All In One
# https://www.cnblogs.com/xgqfrms/p/15384401.html
https://www.runoob.com/linux/linux-comm-crontab.html
demos
(🐞 反爬蟲測試!打擊盜版⚠️)如果你看到這個信息, 說明這是一篇剽竊的文章,請訪問
https://www.cnblogs.com/xgqfrms/ 查看原創文章!
corn
crontab guru
The quick and simple editor
for cron schedule expression
s by Cronitor
# At 08:00 on Sunday
0 8 * * 0
which
➜ ~ which sh
/bin/sh
➜ ~ which zsh
/bin/zsh
➜ ~ which bash
/bin/bash
➜ ~ which node
/Users/xgqfrms-mbp/.nvm/versions/node/v12.18.0/bin/node
➜ ~ which nginx
/usr/local/bin/nginx
➜ ~ which flutter
/Users/xgqfrms-mbp/Documents/Flutter/flutter/bin/flutter
refs
https://www.runoob.com/linux/linux-shell.html
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 發布文章使用:只允許注冊用戶才可以訪問!
原創文章,版權所有©️xgqfrms, 禁止轉載 🈲️,侵權必究⚠️!