Cheers
Aaron
Date: Wed, 15 Sep 2010 10:31:10 -0400
From: ichesal@xxxxxxxxxxxxxxxxxx
To: condor-users@xxxxxxxxxxx
Subject: Re: [Condor-users] Only run when logged of?
On Wed, Sep 15, 2010 at 8:48 AM, Dave STREET <davey_street@xxxxxxxxxxx
<mailto:davey_street@xxxxxxxxxxx>> wrote:
I am sure this is easy and I know some people do it, but how can I
make it so windows machines only accept jobs and run jobs while no
one is logged on, and remove jobs as soon as a user logs in?
I can see how to set up for CPU and keyboard busy. But I want to
have the logged on status of the machine control when jobs can and
cant run?
Aaron,
There isn't a built-in macro in Condor that indicates whether a user is
logged in to a machine or not. But you could write something that can be
called from a STARTD_CRON that returned True or False depending on
whether users are logged in or not.
And then:
STARTD_CRON_JOBLIST = LOGINCHECKER
STARTD_CRON_LOGINCHECKER_PREFIX = LoginChecker
STARTD_CRON_LOGINCHECKER_EXECUTABLE = c:\condor\loginchecker.exe
STARTD_CRON_LOGINCHECKER_PERIOD = 1m
STARTD_CRON_LOGINCHECKER_MODE = Periodic
STARTD_CRON_LOGINCHECKER_RECONFIG = True
(That syntax is likely not 100% correct, I'm working from memory here on
the cron syntax, but that should get you started)
The output from loginchecker.exe should be ClassAd attribute syntax. So:
UsersLoggedIn = (True|False)
That'll produce an attribute in your machine's ad called
LoginCheckerUsersLoggedIn that you can reference in your
START/SUSPEND/PREEMPT strings:
START = $(LoginCheckerUsersLoggedIn) =!= True
That should also keep START = False if the cron hasn't run and the
attribute has never been set.
- Ian
Cycle Computing, LLC
The Leader in Open Compute Solutions for Clouds, Servers, and Desktops
Enterprise Condor Support and Management Tools
http://www.cyclecomputing.com
http://www.cyclecloud.com
_______________________________________________ Condor-users mailing
list To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx
with a subject: Unsubscribe You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users The archives can
be found at: https://lists.cs.wisc.edu/archive/condor-users/
------------------------------------------------------------------------
_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/