From 4f12269c30494121d636b8def56ae15a90244339 Mon Sep 17 00:00:00 2001 From: arjuan <rmarchant+github@gmail.com> Date: Wed, 20 Nov 2019 23:54:51 +0000 Subject: [PATCH] add offset to cron job --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d697d4c..bdbf0fd 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ You can then run the script as a cron job : */15 * * * * python /home/user/gandi_ddns.py ``` +But to be nice to the API servers, you should choose a random offset for your job. For example to run at 2 minutes after the hour, and then every 15 minutes : + +``` +2-59/15 * * * * pythong /home/user/gandi-ddns.py +``` + macOS ``` @@ -26,9 +32,3 @@ ln -s $(pwd) /usr/local/gandi-ddns sudo cp gandi.ddns.plist /Library/LaunchDaemons/ sudo launchctl /Library/LaunchDaemons/gandi.ddns.plist ``` - -But to be nice to the API servers, you should choose a random offset, for example to run at 2 minutes after the hour, and then every 15 minutes : - -``` -2-59/15 * * * * python /home/user/gandi-ddns.py -``` -- GitLab