Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
32b3717c
Commit
32b3717c
authored
Jan 17, 2017
by
neilpang
Browse files
random minute
parent
a8ab028b
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
32b3717c
...
...
@@ -3371,15 +3371,18 @@ installcronjob() {
_err
"Can not install cronjob,
$PROJECT_ENTRY
not found."
return
1
fi
_t
=
$(
_time
)
random_minute
=
$(
_math
$_t
% 60
)
if
_exists
uname
&&
uname
-a
|
grep
SunOS
>
/dev/null
;
then
crontab
-l
|
{
cat
echo
"
0
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
}
| crontab
--
else
crontab
-l
|
{
cat
echo
"
0
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
echo
"
$random_minute
0 * * *
$lesh
--cron --home
\"
$LE_WORKING_DIR
\"
> /dev/null"
}
| crontab -
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment