Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

命令行(非交互式)追加和删除crontab #19

Open
maboloshi opened this issue Oct 18, 2020 · 0 comments
Open

命令行(非交互式)追加和删除crontab #19

maboloshi opened this issue Oct 18, 2020 · 0 comments

Comments

@maboloshi
Copy link
Owner

  1. 直接覆写crontab
echo "0 18 * * * ~/.aria2/trackers-list-aria2.sh" | crontab -
  1. 追加
(crontab -l 2&> /dev/null; echo "0 18 * * * ~/.aria2/trackers-list-aria2.sh") | crontab -
  1. 删除特定条目
crontab -l 2&> /dev/null| sed "/trackers-list-aria2.sh/d" | crontab -

最后的-可删除

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant