[wpkg-users] Run on a schedule

Troy Hamilton troy.a.hamilton at gmail.com
Sun Aug 19 18:50:58 CEST 2012


On Sun, Aug 19, 2012 at 9:19 AM, Kristofer <kristofer at cybernetik.net> wrote:

>
> Is it possible to run on a schedule (every 12 or 24 hours for example), in
> the case that users never log out, or I want to make sure updates get
> pulled by clients in a some-what timely fashion?
>

Kris,

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

http://www.kalab.com/freeware/cron/This is how I handle running wpkg
periodically:cron.htm <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/20120819/52fa33c8/attachment-0002.html>


More information about the wpkg-users mailing list