<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>954NETWORK BLOG! &#187; Schedule Defragment</title>
	<atom:link href="http://blog.954network.com/tag/schedule-defragment/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.954network.com</link>
	<description>Information Technology Solutions Blog - Presented by 954Network, Inc.</description>
	<lastBuildDate>Thu, 08 Oct 2009 14:16:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Schedule Hard Drive Defrag through Logon Script</title>
		<link>http://blog.954network.com/2009/06/03/schedule-hard-drive-defrag-through-logon-script/</link>
		<comments>http://blog.954network.com/2009/06/03/schedule-hard-drive-defrag-through-logon-script/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 19:57:34 +0000</pubDate>
		<dc:creator>digitalkid</dc:creator>
				<category><![CDATA[General Computing]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Defragment Login Script]]></category>
		<category><![CDATA[Schedule Automatic Defrag]]></category>
		<category><![CDATA[Schedule Defragment]]></category>

		<guid isPermaLink="false">http://blog.954network.com/?p=181</guid>
		<description><![CDATA[Hello again,
Recently I had a need to schedule a monthly defrag on all of the client machines in one of the networks that I manage. As usual, finding an efficient way of centrally deploying such a task is much easier than going to each machine and manually creating the task. I accomplished this by editing [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<p>Recently I had a need to schedule a monthly defrag on all of the client machines in one of the networks that I manage. As usual, finding an efficient way of centrally deploying such a task is much easier than going to each machine and manually creating the task. I accomplished this by editing the SBS_LOGIN_SCRIPT.bat that is present on all SBS 2003 servers by default. Of course, if you are not in an SBS environment, you can apply this to any other login scripts that you may already have or create a new one and deploy it through Group Policy.</p>
<p>For my purposes, I needed a defrag to run automatically monthly on all machines so I used an app called schtasks.exe that is already installed on all 2000/XP machines. You can read the syntax by typing &#8220;schtasks /?&#8221; at the command prompt. Below is the line I added to my login script.</p>
<p>schtasks.exe /create /SC MONTHLY /D 20 /TN DefragMonthly /TR &#8220;C:\Windows\System32\defrag.exe\&#8221;C: -f&#8221; /ST 00:45:00 /SD 06/01/2009 /RU SYSTEM</p>
<p>Now, let me explain that as it may look cryptic..</p>
<p>/create &#8211; Indicates you are creating a scheduled task.<br />
/SC &#8211; Specifies the Schedule Frequency (MONTHLY in this case).<br />
/D &#8211; The Day of the month is should run (the 20th of each month in this case).<br />
/TN &#8211; The Task Name (MonthlyDefrag in this case).<br />
/TR &#8211; Task Run specifies the task to be ran or the application to be executed (&#8221;C:\Windows\System32\defrag.exe\&#8221;C: -f&#8221; in this case ((defrag.exe /? for more info on this))).<br />
/ST &#8211; Start Time is the Hour at which the task should start in 24 hour format.<br />
/SD &#8211; The Start Date, pretty self explanatory.<br />
/RU &#8211; The user to run the task as (SYSTEM in this case &#8211; Must be SYSTEM or and Administrator).</p>
<p>After adding the above line to the Login Script, a new scheduled task will be added to the machines that run the login script. You can then wait until after the schedule was set to be run and check if it ran.</p>
<p>That is it for now..</p>
<p>DigitalKid (Jason)<br />
<a href="http://www.954network.com">www.954network.com</a></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://blog.954network.com/2009/06/03/schedule-hard-drive-defrag-through-logon-script/&amp;t=Schedule+Hard+Drive+Defrag+through+Logon+Script&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://blog.954network.com/2009/06/03/schedule-hard-drive-defrag-through-logon-script/&amp;title=Schedule+Hard+Drive+Defrag+through+Logon+Script&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Schedule+Hard+Drive+Defrag+through+Logon+Script;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.954network.com/2009/06/03/schedule-hard-drive-defrag-through-logon-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
