<?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>It&#039;s Me, Tommy!</title>
	<atom:link href="http://itsmetommy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://itsmetommy.com</link>
	<description>a little bit of everything...</description>
	<lastBuildDate>Thu, 23 Feb 2012 07:48:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>cronjob</title>
		<link>http://itsmetommy.com/2012/02/23/cronjob/</link>
		<comments>http://itsmetommy.com/2012/02/23/cronjob/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 07:15:49 +0000</pubDate>
		<dc:creator>r1tommy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://itsmetommy.com/?p=2158</guid>
		<description><![CDATA[Welcome back to another round of nerd. Have you ever wanted to learn about cronjobs? Then you&#8217;ve come to the right place for a basic overview. Wikipedia &#8211; &#8220;cron is a time-based job scheduler in Unix-like computer operating systems. cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome back to another round of nerd. Have you ever wanted to learn about cronjobs? Then you&#8217;ve come to the right place for a basic overview.</p>
<p><a href="http://en.wikipedia.org/wiki/Cron" target="_blank">Wikipedia</a> &#8211; &#8220;<em>cron is a time-based job scheduler in Unix-like computer operating systems. cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration.</em>&#8221;</p>
<p>So where was I? Oh yeah, cronjobs.</p>
<h2><strong>The basics:</strong></h2>
<p><em>Read the man pages.</em></p>
<p>Man pages: cron(8) crontab(5) crontab(1)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ man <span style="color: #cc66cc;">8</span> cron</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ man <span style="color: #cc66cc;">5</span> crontab</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ man crontab</pre></div></div>

<p><strong>List your crontab:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ crontab <span style="color: #339933;">-</span>l</pre></div></div>

<p><strong>List a users crontab</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ crontab <span style="color: #339933;">-</span>l <span style="color: #339933;">-</span>u <span style="color: #339933;">&lt;</span>user<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo crontab <span style="color: #339933;">-</span>l <span style="color: #339933;">-</span>u root</pre></div></div>

<p><strong>Remove your crontab(s):</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ crontab <span style="color: #339933;">-</span>r</pre></div></div>

<h2><strong>Syntax:</strong></h2>
<p>* * * * * command to be executed<br />
- &#8211; - &#8211; -<br />
| | | | |<br />
| | | | &#8212;&#8211; Day of week (0 &#8211; 7) (Sunday=0 or 7)<br />
| | | &#8212;&#8212;- Month (1 &#8211; 12)<br />
| | &#8212;&#8212;&#8212; Day of month (1 &#8211; 31)<br />
| &#8212;&#8212;&#8212;&#8211; Hour (0 &#8211; 23)<br />
&#8212;&#8212;&#8212;&#8212;- Minute (0 &#8211; 59)</p>
<p><a href="http://www.itsmetommy.com/wp-content/uploads/crontab-time-and-fields.png"><img class="alignnone size-full wp-image-2159" title="crontab - time and fields" src="http://www.itsmetommy.com/wp-content/uploads/crontab-time-and-fields.png" alt="" width="377" height="130" /></a></p>
<h2><strong>Editing crontab:</strong></h2>
<p><strong>Edit your personal crontab:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ crontab <span style="color: #339933;">-</span>e</pre></div></div>

<p>OR</p>
<p><strong>Edit another users crontab:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo crontab <span style="color: #339933;">-</span>e <span style="color: #339933;">-</span>u <span style="color: #339933;">&lt;</span>user<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo crontab <span style="color: #339933;">-</span>e <span style="color: #339933;">-</span>u root</pre></div></div>

<p>Note: <em>Use root when you want to run a command that involves sudo.</em></p>
<h2><strong>Format:</strong></h2>
<p>Now that we know where to add a cronjob, lets learn the format. Nothing is better than just showing you the exact commands.<strong><br />
</strong></p>
<p><strong>Runs at startup:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every 5 minutes:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">15</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">25</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">40</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">45</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">55</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">*/</span><span style="color: #cc66cc;">5</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every hour:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every day (at midnight):</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every week:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every month:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p><strong>Runs every year/annually:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">1</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">*</span> <span style="color: #339933;">/</span>path_to_script_or_command</pre></div></div>

<p>But Tommy, I wish there was just a simple generator where I can plug in exactly what I want and get those numbers generated for me automatically. Well, you&#8217;re in luck.</p>
<p><a href="http://www.generateit.net/cron-job" target="_blank">http://www.generateit.net/cron-job</a></p>
<h2><strong>My real world example:</strong></h2>
<p>If you read my &#8220;<a href="http://itsmetommy.com/2011/09/22/mac-terminal-loading-slow/" target="_blank">Mac Terminal Loading Slow</a>&#8221; post, you&#8217;ll notice that you&#8217;d need to clear the logs every week/month or so. I wanted to automate this task. I couldn&#8217;t place the <strong>sudo rm -f /private/var/log/asl/*.asl</strong> command in my .bash_* due to sudo. Actually, I could have, but I didn&#8217;t want to enter my password every time it ran (who would want to do that?). So I decided to add the command directly into a cronjob and run it every week. Also, since it&#8217;s a sudo command, I am adding it to the user <strong>root</strong>&#8216;s crontab.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo crontab <span style="color: #339933;">-</span>e <span style="color: #339933;">-</span>u root</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">0</span> rm <span style="color: #339933;">-</span>f <span style="color: #339933;">/</span><span style="color: #000000; font-weight: bold;">private</span><span style="color: #339933;">/</span><span style="color: #000000; font-weight: bold;">var</span><span style="color: #339933;">/</span><span style="color: #990000;">log</span><span style="color: #339933;">/</span>asl<span style="color: #666666; font-style: italic;">/*.asl</span></pre></div></div>

<p><strong>Note</strong>: <em>I no longer have to use sudo because root has an all access pass to do everything it wants.</em></p>
<p>You should understand the basics of how to create a cronjob. Now get out there and automate something and make your life that much easier. Remember, never work hard, work smart.</p>
<p><strong>References:</strong></p>
<ul>
<li><a href="http://ss64.com/osx/crontab.html" target="_blank">http://ss64.com/osx/crontab.html</a></li>
<li><a href="http://www.generateit.net/cron-job" target="_blank">http://www.generateit.net/cron-job</a></li>
<li><a href="http://en.wikipedia.org/wiki/Cron" target="_blank">http://en.wikipedia.org/wiki/Cron</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://itsmetommy.com/2012/02/23/cronjob/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chmod</title>
		<link>http://itsmetommy.com/2012/02/05/chmod/</link>
		<comments>http://itsmetommy.com/2012/02/05/chmod/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 02:52:11 +0000</pubDate>
		<dc:creator>r1tommy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://itsmetommy.com/?p=2153</guid>
		<description><![CDATA[Here&#8217;s a little chmod notes site that I created. http://www.itsmetommy.com/notes/chmod]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little chmod notes site that I created.</p>
<p><a href="http://www.itsmetommy.com/notes/chmod">http://www.itsmetommy.com/notes/chmod</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itsmetommy.com/2012/02/05/chmod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flo Fusion Fitness</title>
		<link>http://itsmetommy.com/2012/02/05/flo-fusion-fitness/</link>
		<comments>http://itsmetommy.com/2012/02/05/flo-fusion-fitness/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 02:32:23 +0000</pubDate>
		<dc:creator>r1tommy</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[flo fusion fitness]]></category>
		<category><![CDATA[olympian]]></category>
		<category><![CDATA[traning]]></category>
		<category><![CDATA[workout]]></category>

		<guid isPermaLink="false">http://itsmetommy.com/?p=2145</guid>
		<description><![CDATA[In my latest adventure comes another website that I created for Flo Fusion Fitness. Train like an Olympian… flofusionfitness.com]]></description>
			<content:encoded><![CDATA[<p>In my latest adventure comes another website that I created for Flo Fusion Fitness. Train like an Olympian…</p>
<p><a href="http://flofusionfitness.com/" target="_blank">flofusionfitness.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itsmetommy.com/2012/02/05/flo-fusion-fitness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Finder Toolbar Favorites Empty/Missing</title>
		<link>http://itsmetommy.com/2012/01/25/mac-finder-toolbar-favorites-emptymissing/</link>
		<comments>http://itsmetommy.com/2012/01/25/mac-finder-toolbar-favorites-emptymissing/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 05:21:55 +0000</pubDate>
		<dc:creator>r1tommy</dc:creator>
				<category><![CDATA[MAC]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[favorites]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[finder empty]]></category>
		<category><![CDATA[finder hide]]></category>
		<category><![CDATA[finder missing]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[toolbar]]></category>

		<guid isPermaLink="false">http://itsmetommy.com/?p=2134</guid>
		<description><![CDATA[OS: Lion Mac OS X Version 10.7.2 As simple as it may be, some people may not be aware of the &#8220;Hide&#8221; &#38; &#8220;Show&#8221; option within the Finder sidebar. If you accidentally Hide your Favorites, you may not realize that there is a &#8220;Show&#8221; button that appears when your cursor hovers over that particular area. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>OS: </strong><em>Lion Mac OS X Version 10.7.2</em></p>
<p>As simple as it may be, some people may not be aware of the &#8220;<strong>Hide</strong>&#8221; &amp; &#8220;<strong>Show</strong>&#8221; option within the Finder sidebar. If you accidentally Hide your Favorites, you may not realize that there is a &#8220;Show&#8221; button that appears when your cursor hovers over that particular area.</p>
<p>This is what your Finder may look like.</p>
<p><a href="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty.png"><img class="alignnone size-large wp-image-2135" title="Mac Finder Empty" src="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty-650x450.png" alt="" width="650" height="450" /></a></p>
<p>Hover your cursor to the right of the word Favorites and the word &#8220;<strong>Show</strong>&#8221; will appear for you to click.</p>
<p><a href="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty-Show.png"><img class="alignnone size-large wp-image-2136" title="Mac Finder Empty - Show" src="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty-Show-650x450.png" alt="" width="650" height="450" /></a></p>
<p>Now you can see your Favorites are back.<br />
<a href="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty-Hide.png"><img class="alignnone size-large wp-image-2137" title="Mac Finder Empty - Hide" src="http://www.itsmetommy.com/wp-content/uploads/Mac-Finder-Empty-Hide-650x450.png" alt="" width="650" height="450" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://itsmetommy.com/2012/01/25/mac-finder-toolbar-favorites-emptymissing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep Bookmarks in Sync</title>
		<link>http://itsmetommy.com/2012/01/22/keep-bookmarks-in-sync/</link>
		<comments>http://itsmetommy.com/2012/01/22/keep-bookmarks-in-sync/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 03:12:15 +0000</pubDate>
		<dc:creator>r1tommy</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[xmarks]]></category>

		<guid isPermaLink="false">http://itsmetommy.com/?p=2114</guid>
		<description><![CDATA[Are you torn between multiple browsers? Do you wish that your bookmarks were in sync? Well, there&#8217;s a simple solution. It&#8217;s called Xmarks. It&#8217;s simple to install and works seamlessly thereafter. I am personally using Firefox and Chrome and really wanted a way to keep my bookmarks updated on both browsers. Created an account - Xmarks Install [...]]]></description>
			<content:encoded><![CDATA[<p>Are you torn between multiple browsers? Do you wish that your bookmarks were in sync? Well, there&#8217;s a simple solution. It&#8217;s called <a href="http://www.xmarks.com/" target="_blank">Xmarks</a>. It&#8217;s simple to install and works seamlessly thereafter.</p>
<p>I am personally using Firefox and Chrome and really wanted a way to keep my bookmarks updated on both browsers.</p>
<ul>
<li>Created an account - <a href="http://www.xmarks.com/" target="_blank">Xmarks</a></li>
<li>Install the plug-in on both browsers by going to <a href="http://download.xmarks.com/download/all" target="_blank">http://download.xmarks.com/download/all</a></li>
<li>Realize that you should have done this a long time ago</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://itsmetommy.com/2012/01/22/keep-bookmarks-in-sync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
