git://git.onelab.eu
/
vserver-reference.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
speed up cron job to be scheduled on a hourly basis instead of daily
[vserver-reference.git]
/
lxc-sliceimage.spec
diff --git
a/lxc-sliceimage.spec
b/lxc-sliceimage.spec
index
1bd6ff0
..
973fff2
100644
(file)
--- a/
lxc-sliceimage.spec
+++ b/
lxc-sliceimage.spec
@@
-59,8
+59,8
@@
if [ "$PL_BOOTCD" != "1" ] ; then
systemctl restart lxc-sliceimage.service
fi
systemctl restart lxc-sliceimage.service
fi
-# Randomize daily run time
+# Randomize hourly run time (used to be daily)
+#H=$((24 * $RANDOM / 32768))
+#sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/lxc-sliceimage
M=$((60 * $RANDOM / 32768))
M=$((60 * $RANDOM / 32768))
-H=$((24 * $RANDOM / 32768))
-sed -i -e "s/@M@/$M/" -e "s/@H@/$H/" %{_sysconfdir}/cron.d/lxc-sliceimage
-
+sed -i -e "s/@M@/$M/" %{_sysconfdir}/cron.d/lxc-sliceimage