<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Windows Scheduled Tasks Tricks</title>
	<atom:link href="http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/</link>
	<description>A Technology Crow in search of Bright Shiny Objects</description>
	<lastBuildDate>Sat, 11 Feb 2012 03:40:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Nathan</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-133738</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Wed, 10 Mar 2010 19:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-133738</guid>
		<description>Scheduled tasks make sense for things that should be run once a week/day/hour, but when you want to run more frequently than that, why don&#039;t you just launch the script (using a scheduled task) and then have the script sleep between loops?  Just have the script run a while loop with a sleep at the top/bottom of the loop, so that it continually runs itself as often as you like?</description>
		<content:encoded><![CDATA[<p>Scheduled tasks make sense for things that should be run once a week/day/hour, but when you want to run more frequently than that, why don&#8217;t you just launch the script (using a scheduled task) and then have the script sleep between loops?  Just have the script run a while loop with a sleep at the top/bottom of the loop, so that it continually runs itself as often as you like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dayna</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-128332</link>
		<dc:creator>Dayna</dc:creator>
		<pubDate>Wed, 28 Oct 2009 16:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-128332</guid>
		<description>What I do is have the process that puts the file in the folder initiate the event that needs to happen next. In that way you don&#039;t have to resort to polling and latency is minimized. The process that drops the file does not actually need to do the post file processing. It just needs to publish an event that can be recieved (listened for) by whatever process then needs to act on the file.

I&#039;m sure you can find some open source software to handle events more frequently than every minute though I do not have any reccomendations.

D.</description>
		<content:encoded><![CDATA[<p>What I do is have the process that puts the file in the folder initiate the event that needs to happen next. In that way you don&#8217;t have to resort to polling and latency is minimized. The process that drops the file does not actually need to do the post file processing. It just needs to publish an event that can be recieved (listened for) by whatever process then needs to act on the file.</p>
<p>I&#8217;m sure you can find some open source software to handle events more frequently than every minute though I do not have any reccomendations.</p>
<p>D.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Owens</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-128318</link>
		<dc:creator>Nick Owens</dc:creator>
		<pubDate>Tue, 27 Oct 2009 17:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-128318</guid>
		<description>This has stumped for a few years and while I&#039;m usually able to get away with a one-minute wait, I can&#039;t accept it for this project.  Based on your expertise, let me know what you think.  I need to fire a process as soon as possible to the time when a file is dropped in a directory.  There are a few options to explore:

1.) I&#039;ve never heard of a way to auto-fire an event, like I would do easily with an event sink, when a file is saved to a directory.  In fact, I&#039;m using an event sink to drop the file in the folder in real-time as the email is received but then I have to wait!

2.) I can create a custom script which fires once per minute and checks the folder for files before deciding to proceed.  The process of checking an empty folder for the presence of any files will take &lt; 20 ms w/ no roundtrips or logging so I&#039;m not too worried about a performance impact.  Then I can have it sleep (Wscript) for about 5 seconds until it checks again.  I&#039;ll run that until the script has been running for 55 seconds and then quit before it starts up again.  If it finds a file, it runs the full process.  If not, it just sleeps or quits.

3.) Is there any third-party software which can run a task (WSH file) more frequently than every minute?</description>
		<content:encoded><![CDATA[<p>This has stumped for a few years and while I&#8217;m usually able to get away with a one-minute wait, I can&#8217;t accept it for this project.  Based on your expertise, let me know what you think.  I need to fire a process as soon as possible to the time when a file is dropped in a directory.  There are a few options to explore:</p>
<p>1.) I&#8217;ve never heard of a way to auto-fire an event, like I would do easily with an event sink, when a file is saved to a directory.  In fact, I&#8217;m using an event sink to drop the file in the folder in real-time as the email is received but then I have to wait!</p>
<p>2.) I can create a custom script which fires once per minute and checks the folder for files before deciding to proceed.  The process of checking an empty folder for the presence of any files will take &lt; 20 ms w/ no roundtrips or logging so I&#039;m not too worried about a performance impact.  Then I can have it sleep (Wscript) for about 5 seconds until it checks again.  I&#039;ll run that until the script has been running for 55 seconds and then quit before it starts up again.  If it finds a file, it runs the full process.  If not, it just sleeps or quits.</p>
<p>3.) Is there any third-party software which can run a task (WSH file) more frequently than every minute?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dayna</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-128317</link>
		<dc:creator>Dayna</dc:creator>
		<pubDate>Tue, 27 Oct 2009 17:28:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-128317</guid>
		<description>As you found the scheduled task GUI does not let you specify run times more frequently than 1 minute. (bummer) Because the schtasks command documentation says the following:

/st StartTime Specifies the time of day that the task starts in HH:MM:SS 24-hour format. The default value is the current local time when the command completes. The /st parameter is valid with MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, and ONCE schedules. It is required with a ONCE schedule. 

I tried creating 2 tasks. One starting at 15 seconds after top of minute and one starting at 30 seconds after top of minute. Unfortunately this does not work. The 2 tasks were both successfully created but both reverted to running at the SS=00. In other words the command ignores the start second parameter and defaults to top of minute.

So you may be left to having to do something custom. One caveat being that if you are trying to do something that can be done by using performance monitor alerts, those actions can run as frequently as every second.

D.</description>
		<content:encoded><![CDATA[<p>As you found the scheduled task GUI does not let you specify run times more frequently than 1 minute. (bummer) Because the schtasks command documentation says the following:</p>
<p>/st StartTime Specifies the time of day that the task starts in HH:MM:SS 24-hour format. The default value is the current local time when the command completes. The /st parameter is valid with MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, and ONCE schedules. It is required with a ONCE schedule. </p>
<p>I tried creating 2 tasks. One starting at 15 seconds after top of minute and one starting at 30 seconds after top of minute. Unfortunately this does not work. The 2 tasks were both successfully created but both reverted to running at the SS=00. In other words the command ignores the start second parameter and defaults to top of minute.</p>
<p>So you may be left to having to do something custom. One caveat being that if you are trying to do something that can be done by using performance monitor alerts, those actions can run as frequently as every second.</p>
<p>D.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Owens</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-128302</link>
		<dc:creator>Nick Owens</dc:creator>
		<pubDate>Mon, 26 Oct 2009 19:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-128302</guid>
		<description>Are you familiar with any method for scheduling a task to run more frequently than every minute, besides a nasty custom solution.  Is there any out of the box software which enables this?</description>
		<content:encoded><![CDATA[<p>Are you familiar with any method for scheduling a task to run more frequently than every minute, besides a nasty custom solution.  Is there any out of the box software which enables this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dayna</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-128189</link>
		<dc:creator>Dayna</dc:creator>
		<pubDate>Thu, 15 Oct 2009 21:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-128189</guid>
		<description>When you copy a .job scheduled task file from one machine to another the task runtime credentials of the job from which you copied do not go with the .job file. (Windows security pain in the as*… I mean feature). Also it was stated earlier in this post that the credentials that show up on the new implementation are those of the user who initiated the copy. That is not correct. The credentials that show up when you look at the copied job are those you are currently logged in with. (try looking at the copied task with two different log-ins to prove this if you wish).  

I have worked around this by using the &quot;schtasks&quot; command line to create the same task on multiple machines at once. It allows you to specify and persist the task runtime credentials used when the task executes. So you can create a .bat or .cmd file that looks something like this:

schtasks /create /tn task1 /tr C:\Monitoring\script.vbs /sc DAILY /st 10:00:00 /s \\server1 /u domain\user /p pword /ru domain\user /rp pword

Put a line like this in your .cmd file for each server you want to implement the task on and you are good to go.

Cheers.</description>
		<content:encoded><![CDATA[<p>When you copy a .job scheduled task file from one machine to another the task runtime credentials of the job from which you copied do not go with the .job file. (Windows security pain in the as*… I mean feature). Also it was stated earlier in this post that the credentials that show up on the new implementation are those of the user who initiated the copy. That is not correct. The credentials that show up when you look at the copied job are those you are currently logged in with. (try looking at the copied task with two different log-ins to prove this if you wish).  </p>
<p>I have worked around this by using the &#8220;schtasks&#8221; command line to create the same task on multiple machines at once. It allows you to specify and persist the task runtime credentials used when the task executes. So you can create a .bat or .cmd file that looks something like this:</p>
<p>schtasks /create /tn task1 /tr C:\Monitoring\script.vbs /sc DAILY /st 10:00:00 /s \\server1 /u domain\user /p pword /ru domain\user /rp pword</p>
<p>Put a line like this in your .cmd file for each server you want to implement the task on and you are good to go.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.solo-technology.com/blog/2009/04/13/windows-scheduled-tasks-tricks/#comment-125065</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 19 Aug 2009 13:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.solo-technology.com/blog/?p=3056#comment-125065</guid>
		<description>When copying the tasks, when not in the same domain, you need to re-enter the password.  What you can do, probably not very helpful to you right now, but you can use the command line (script it) to create your scheduled tasks using SCHTASKS.  That way, you don&#039;t need to back up your tasks, just your .bat or .cmd file.  It also makes setting up scheduled tasks on multiple machines pretty easy.</description>
		<content:encoded><![CDATA[<p>When copying the tasks, when not in the same domain, you need to re-enter the password.  What you can do, probably not very helpful to you right now, but you can use the command line (script it) to create your scheduled tasks using SCHTASKS.  That way, you don&#8217;t need to back up your tasks, just your .bat or .cmd file.  It also makes setting up scheduled tasks on multiple machines pretty easy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

