Cloudflare DDNS
- Update Usage
- Add argparse support
- Add logging file support
- Add typing support
- Add unit test
-
add schedule task
schtasks /create /tn "DDNS" /tr "C:\Users\chenfei\ddns\main.exe" /sc minute /mo 1 /ru System
Parameter explanation:
/tn: Task name.
/tr: Task action to perform (in this case, running a exe).
/sc: Schedule type for the task (e.g., minute, hour, day, etc.).
/mo: Frequency of the scheduled task.
/ru: User account to use when executing the task. In this case, we are using the System account. -
delete schedule task
schtasks /delete /tn "DDNS" /f
-
query schedule task
schtasks /query /tn "DDNS"
-
run schedule task
schtasks /run /tn "DDNS"
on linux
crontab
* * * * * cd /home/chenfei/Services/simple_cloudflare_ddns && python3 main.py >> /home/chenfei/Services/simple_cloudflare_ddns/ddns.log 2>&1