Re: [wpkg-users] running wpkgclient on schedule?

2009-09-13 Thread Daniel Dehennin
Kai Pastor dg...@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


pgp4KudWoXgw5.pgp
Description: PGP signature
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] running wpkgclient on schedule?

2009-09-11 Thread Pendl Stefan

 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.

 Cheers
 ---
 Grzegorz Marszałek

How about shutting down the machine from a scheduled task, which should trigger 
WPKG at shutdown?

---
Stefan
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] running wpkgclient on schedule?

2009-09-11 Thread Daniel Dehennin
Grzegorz Marszałek gr...@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


pgpsmdjdMwCly.pgp
Description: PGP signature
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] running wpkgclient on schedule?

2009-09-11 Thread Pendl Stefan

 
  How about shutting down the machine from a scheduled task, which
  should trigger WPKG at shutdown?

 not good. Server must be running all the time.

 cheers
 ---
 Grzegorz Marszałek

I did not mean to reboot the server, but the clients.

---
Stefan
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users