[wpkg-users] tool for task scheduling?

Troy Hamilton troy.a.hamilton at gmail.com
Mon May 10 15:46:54 CEST 2010


2010/5/10 Grzegorz Marszałek <graf0 at post.pl>

> Hello!
>
> I need to schedule wpkgclient start - to run wpkg.js at diffirent times. I
> need this for running wpkg on servers (rare reboots) and laptops (also rare
> reboots - usually hibernate, and reboots not always in company networks).
>  ...

So - does anybody nows some wise commandline tool, where I can say: run this
> script at 10:00 from monday to friday - and it will JUST WORK on any windows
> system?
>

Grzegorz,

I've had great luck using both versions of CRON found here:

http://www.kalab.com/freeware/cron/cron.htm

I prefer these native versions to PyCron since they don't require a Python
installation.

For running WPKG, I use the crons.exe version which installs itself as a
service.  After copying crons.exe and a crontab file to C:\WINDOWS\SYSTEM32,
I just run these two commands:

c:\windows\system32\crons.exe /install
c:\windows\system32\sc.exe start CRON

And here is an example of the crontab that I use (look out for wrapped lines
below):
-----------------------------------------------------
# Basic crontab format:
#
# +---------------- minute (0 - 59)
# |  +------------- hour (0 - 23)
# |  |  +---------- day of month (1 - 31)
# |  |  |  +------- month (1 - 12)
# |  |  |  |  +---- day of week (0 - 6) (Sunday=0)
# |  |  |  |  |
# *  *  *  *  *  command to be executed

# refresh the crontab file every 10 minutes
0,10,20,30,40,50 * * * * c:\windows\system32\xcopy.exe /y "\\
fully.qualified.domain.name\NETLOGON\APPS\cron\crontab"
"c:\windows\system32"

# run wpkg.bat at 10pm, midnight, and 2am each day
0 22,0,2 * * * c:\windows\system32\cmd.exe /c \\fully.qualified.domain.name\
NETLOGON\APPS\wpkg\wpkg.bat
-----------------------------------------------------

That website also has a cron.exe version which can be run as the logged-in
user, but for running WPKG, I prefer to have the CRON service run as the
system user and just grant "Domain Computers" read/execute access to
%SOFTWARE%.

Cheers,

Troy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20100510/754484b1/attachment-0002.html>


More information about the wpkg-users mailing list