[wpkg-users] running wpkgclient on schedule?

Daniel Dehennin daniel.dehennin at ac-caen.fr
Fri Sep 11 19:13:01 CEST 2009


Grzegorz Marszałek <graf0 at post.pl> writes:

> 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.

Here is what we use:

--8<---------------cut here---------------start------------->8---
<?xml version='1.0' encoding='utf-8'?>
<packages>
  <package
      id='wpkg-at'
      name='Run WPKG at a time'
      revision='1'
      reboot='false'
      priority='100'>

    <variable name='ATTIME' value='12:30 /every:l,ma,me,j,v'/>
    <variable name='ATCMD' value='sc start wpkgservice'/>

    <check type='execute' path='%ComSpec% /c at | find "%ATCMD%" > NUL'/>

    <install cmd='at %ATTIME% %ATCMD%/>

    <remove cmd='at | "%SOFTWARE%\gnu\gawk.exe" "/%ATCMD%/ { system(\"at \" $1 \" /delete\") }"'/>

    <upgrade cmd='at | "%SOFTWARE%\gnu\gawk.exe" "/%ATCMD%/ { system(\"at \" $1 \" /delete\") }"'/>
    <upgrade cmd='at %ATTIME% %ATCMD%'/>

  </package>
</packages>
--8<---------------cut here---------------end--------------->8---

This requires gawk.exe.

NB: commands with pipes need to be start in a shell (%ComSpec%).

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/20090911/f8c01957/attachment-0001.sig>


More information about the wpkg-users mailing list