<?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: How to Run a Cygwin Command From Windows Scheduler (Scheduled Tasks)</title>
	<atom:link href="http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/</link>
	<description>A blog about web design, programming, hosting, and virtualmin hacks</description>
	<lastBuildDate>Tue, 08 Nov 2011 04:49:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-318</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 08 Nov 2011 04:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-318</guid>
		<description>Glad to hear it : )</description>
		<content:encoded><![CDATA[<p>Glad to hear it : )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diorno</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-317</link>
		<dc:creator>Diorno</dc:creator>
		<pubDate>Tue, 08 Nov 2011 02:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-317</guid>
		<description>Thanks for this, works perfectly to resolve my Windows shell headaches :)</description>
		<content:encoded><![CDATA[<p>Thanks for this, works perfectly to resolve my Windows shell headaches <img src='http://zenovations.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-287</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 27 Apr 2011 13:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-287</guid>
		<description>@Ocamler - nice! I&#039;ve updated the bash script in the post accordingly.</description>
		<content:encoded><![CDATA[<p>@Ocamler &#8211; nice! I&#8217;ve updated the bash script in the post accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ocamler</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-286</link>
		<dc:creator>Ocamler</dc:creator>
		<pubDate>Wed, 27 Apr 2011 13:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-286</guid>
		<description>If your %HOME% directory has spaces in it, you&#039;ll want to modify line 8 to look like this to avoid an error:

bash --rcfile &quot;%HOME%/.bashrc&quot; -i -c &quot;%myargs%&quot;

Awesome bat file, use it every day for my scheduled tasks.</description>
		<content:encoded><![CDATA[<p>If your %HOME% directory has spaces in it, you&#8217;ll want to modify line 8 to look like this to avoid an error:</p>
<p>bash &#8211;rcfile &#8220;%HOME%/.bashrc&#8221; -i -c &#8220;%myargs%&#8221;</p>
<p>Awesome bat file, use it every day for my scheduled tasks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-285</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 13 Apr 2011 20:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-285</guid>
		<description>Thanks, this was very useful and saved time :)</description>
		<content:encoded><![CDATA[<p>Thanks, this was very useful and saved time <img src='http://zenovations.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-148</link>
		<dc:creator>Ray</dc:creator>
		<pubDate>Thu, 03 Feb 2011 02:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-148</guid>
		<description>An easier way is to call bash.exe and pass the script as an argument:

Example I want a scheduled task that backs-up my scheduled tasks...

Create a one-liner in cygwin /home/brightblueray/bin/schedTasksBackup.sh
schtasks.exe /QUERY /XML &gt; /cygdrive/c/Users/rryjew/Documents/ScheduledTasksBackup/schedTasks.xml

Then create a scheduled task calling:
 C:\cygwin\bin\bash.exe 
... with an argument of my shell script:
/home/brightblueray/bin/schedTasksBackup.sh

XML to import into task scheduler ...
&lt;!-- \BackupScheduledTasks --&gt;




  

    2011-02-02T21:02:10.9135301

    bbr-laptop\brightblueray

  

  

    

      2011-02-02T09:00:00

      true

      

        1

      

    

  

  

    

      LeastPrivilege

      bbr-laptop\brightblueray

      InteractiveToken

    

  

  

    IgnoreNew

    true

    true

    true

    false

    false

    

      true

      false

    

    true

    true

    false

    false

    false

    P3D

    7

  

  

    

      C:\cygwin\bin\bash.exe

      /home/brightblueray/bin/schedTasksBackup.sh

    

  

</description>
		<content:encoded><![CDATA[<p>An easier way is to call bash.exe and pass the script as an argument:</p>
<p>Example I want a scheduled task that backs-up my scheduled tasks&#8230;</p>
<p>Create a one-liner in cygwin /home/brightblueray/bin/schedTasksBackup.sh<br />
schtasks.exe /QUERY /XML &gt; /cygdrive/c/Users/rryjew/Documents/ScheduledTasksBackup/schedTasks.xml</p>
<p>Then create a scheduled task calling:<br />
 C:\cygwin\bin\bash.exe<br />
&#8230; with an argument of my shell script:<br />
/home/brightblueray/bin/schedTasksBackup.sh</p>
<p>XML to import into task scheduler &#8230;<br />
<!-- \BackupScheduledTasks --></p>
<p>    2011-02-02T21:02:10.9135301</p>
<p>    bbr-laptop\brightblueray</p>
<p>      2011-02-02T09:00:00</p>
<p>      true</p>
<p>        1</p>
<p>      LeastPrivilege</p>
<p>      bbr-laptop\brightblueray</p>
<p>      InteractiveToken</p>
<p>    IgnoreNew</p>
<p>    true</p>
<p>    true</p>
<p>    true</p>
<p>    false</p>
<p>    false</p>
<p>      true</p>
<p>      false</p>
<p>    true</p>
<p>    true</p>
<p>    false</p>
<p>    false</p>
<p>    false</p>
<p>    P3D</p>
<p>    7</p>
<p>      C:\cygwin\bin\bash.exe</p>
<p>      /home/brightblueray/bin/schedTasksBackup.sh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/comment-page-1/#comment-24</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Tue, 16 Jun 2009 19:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://zenovations.com/blog/?p=125#comment-24</guid>
		<description>Thank you. This saved me a bit of time trying to figure it out otherwise.

exec &gt;&gt; /pathto/logfile 2&gt;&amp;1 worked for me even using this method.</description>
		<content:encoded><![CDATA[<p>Thank you. This saved me a bit of time trying to figure it out otherwise.</p>
<p>exec &gt;&gt; /pathto/logfile 2&gt;&amp;1 worked for me even using this method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

