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

换ip后怎么自动执行任务 #92

Open
ksxc opened this issue Apr 8, 2024 · 1 comment
Open

换ip后怎么自动执行任务 #92

ksxc opened this issue Apr 8, 2024 · 1 comment

Comments

@ksxc
Copy link

ksxc commented Apr 8, 2024

我有一台拨号vps经常更换ip,想更换ip后自动执行reboot

@fscarmen2
Copy link
Owner

首次,换ip不会影响每天定时执行的任务,因为那个与IP无关。
其次,你想更换 ip 后执行 reboot 动作,可以让 gpt 与个脚本,每5分钟检测一次当前IP,并记录在本地,前发现本次与上次的IP不同的时候就执行重启。
最后,并把该脚本放在 crontab 里做到重启自动生效 @reboot

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

2 participants