[wpkg-users] running wpkgclient on schedule?

Daniel Dehennin daniel.dehennin at ac-caen.fr
Sun Sep 13 18:48:09 CEST 2009


Kai Pastor <dg0yt at darc.de> writes:

> schtasks /create /tn "Software-Updates" /tr "net start WpkgService"
> /sc täglich /st 05:%TIME:~3,2%:00 /ru System /f
>
> It includes some magic to avoid having all machines starting the task
> at the same time. Note that schtasks depends on the language (täglich
> = daily).

Thanks, I was not aware of schtasks, much more easy than at ;-)

I want to include a little more trick for the random launching.

I want all the machine to start betwee 10 and 50 of an hour, I use the following:
- get a random between 0 and 40,
- add 10

--8<---------------cut here---------------start------------->8---
SET /a MINUTE=%RANDOM%%40+10
schtasks /create /tn "WPKGservice" /tr "sc start WpkgService" /SC DAILY /ST 05:%MINUTE%:00 /ru System
--8<---------------cut here---------------end--------------->8---
Regards.
-- 
Daniel Dehennin
RAIP de l'Orne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090913/27582a20/attachment.pgp>


More information about the wpkg-users mailing list