[wpkg-users] running wpkgclient on schedule?
Kai Pastor
dg0yt at darc.de
Fri Sep 11 19:34:50 CEST 2009
Grzegorz Marszałek schrieb:
> Hello!
>
> I have configured wpkgclient to launch at shutdown - and it's working
> nice. Now I need a way to run wpkg on schedule, ie.: each day at 6 am.
> Could it be done with wpkgclient or should I write my own script to do
> that? First option seems nicer because I have proper share with proper
> credentials mapped.
I use a scheduled task which starts WpkgService:
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).
As a package:
<package
id="WPKG Client Scheduled Task CONFIG"
name="WPKG Client Scheduled Task at 5.00 am + x"
revision="0"
reboot="false"
priority="10">
<check type="logical" condition="or">
<!-- Windows XP -->
<check type="file" condition="exists"
path="%SystemRoot%\Tasks\Software-Updates.job" />
<!-- Windows Vista -->
<check type="file" condition="exists"
path="%SystemRoot%\System32\Tasks\Software-Updates" />
</check>
<install timeout="30" cmd='cmd /c schtasks /create /tn
"Software-Updates" /tr "net start WpkgService" /sc täglich /st
05:%TIME:~3,2%:00 /ru System /f' />
<remove timeout="30" cmd='schtasks /delete /f /tn "Software-Updates"' >
<exit code="any" />
</remove>
</package>
Bye, Kai.
More information about the wpkg-users
mailing list