Icon_search
Stephanie Sharp Jennifer Fleece Buck Sharp Kim Landrum Charlie Maffitt Juli Tredwell Kevin Warrick

Travis' Blog

RSS

Anatomy of a Cron Job

Posted on 07/03/2008
24 Comments

For a long time, cron jobs have been a mystery to me. They seemed much too complicated and I didn't understand them. Whenever I needed to create one with our old host, they had a handy gui-based cron job creator. Still not the most intuitive thing I've ever used, but it got the job done. Now that we've switched over to Rails Machine for our hosting, there is no concept of a gui cron wizard for me to rely on anymore. It was time I put on my big-boy pants and learned to write a cron job like the adults do.

Like most things that intimidate me, I found that there wasn't much to it when I actually dove in and starting researching the topic. Now, I consider myself to be, at the least, competent at creating new cron jobs. Below is a description of the formatting of cron jobs as well as a few examples. I'm keeping this post mostly as a reference for myself, but if it can help anyone else then that's great.

Explanation of how a cron job is formatted

 *   *   *   *   *  some command or group of commands
(1)(2)(3)(4)(5)

(1) minute (00-59)
(2) hour (in 24-hour format of course, 0-23)
(3) day (1-31)
(4) month (1-12)
(5) day of week (0-7 where Sunday is 0 AND 7)

Examples

We want to clear the log files at 2am every Sunday morning.

00  2  *  *  0  cd /var/www/apps/plexus/current; rake log:clear

We want to run some rake task every weekday at noon.

00  12  *  *  1-5  cd /var/www/apps/plexus/current; rake some_task

Let's say we only want to run a script on the 1st and 15th of the month at midnight, and only in the month of June

00  0  1,15  6  *  /path/to/script

If you specify both a month day AND a weekday, then the cron will treat it as cumulative and run on both days. The following script will be executed every Saturday and Sunday at 12:00pm, but will also be run on the 10th of each month.

00  12  10  *  0,6  /path/to/script

Not so bad, is it?

Tagged:  cron job, cron

Back to top

Git With the Program

Posted on 06/23/2008
2 Comments

Git is "an open source version control system designed to handle very large projects with speed and efficiency." It's also well-suited for smaller repositories and is very popular in the open source community because of its ability for many people to work on the same project. Git is much faster than most other, more common version control systems.

We're still running Subversion here at Plexus, which has suited our needs spectacularly. Despite its features, I don't imagine that we'll move to git anytime soon, particularly because of its rather steep learning curve. I have created an account with github, a free online git repository hosting service, to help me get better acquanted with git. It definitely takes a little while to get the hang of. It's a lot different than Subversion.

Git resources:


Projects using git:

  • The Linux Kernel (after all, git was written by Linus Torvalds)
  • One Laptop Per Child core development
  • Ruby on Rails

Tagged:  git, subversion

Back to top

Google takes on Wikipedia

Posted on 12/15/2007
1 Comment

Google announced this week that they will be launching a new service soon called "Knol" (meaning a unit of knowledge). It's designed to be a source of knowledge similar to Wikipedia. Their aim is to allow experts to write authoritative articles covering their areas of expertise. Sounds a lot like Wikipedia, right? Well, with Knol, Google will allow authors to have profiles so the user can know exactly who wrote what. In addition to the accountability of the sources, Knol will also allow authors to place ads on their created pages, giving them a portion of the revenue generated from the ad clicks.

You can read more about it on Google's official blog.

Tagged:  google, knol, wikipedia

Back to top

Installing Multiple Version of Internet Explorer on One Machine

Posted on 05/26/2007
12 Comments

Thanks to Microsoft, it's been impossible in the past to install two different versions of Internet Explorer in Windows. Whenever a new one is installed, the older version is deleted. Good for end-users, but bad for us. We need the ability to test our sites on multiple browsers to ensure uniformity. Because of the IE multiple install problem, we have to maintain a separate test computer just to be able to access IE 6 for testing.

Our own black sheep Shawn came through with a resource he stumbled across that would solve this problem. The MultipleIE installer takes advantage of a DLL exploit in Windows (imagine that!) to allow installation of IE 3, 4.01, 5, 5.5, and 6! Not bad!

Tagged:  Internet Explorer, browser, testing

Back to top

Local Business Workers Start Restaurant Tour

Posted on 05/10/2007
3 Comments

Several times a week a few of Plexus' underpaid staff go out to lunch at various locations around Athens. We've been doing this for quite some time, and have compiled quite a list of regular destinations. Recently, with the help of the EATS Tour, we decided to broaden our horizons and try some of more choice locations of Athens's underbelly.

The BARFS Tour was born. BARFS, or the Bar and Restaurant Food Society, was created by founding members Colin Jones, Adam Parrott, Travis Roberts, and Buck Sharp. We plan to spend the next few months sampling the not-so-finer things in life.

So, if you're interested in finding out what a few Athenians think are C list restaurants and reading what we think about each dining experience, check out the BARFS Tour Blog. For all the restaurants we visit, we will dine then post our reviews of food, atmosphere, service and price of the restaurant.

Tagged:  BARFS Tour, Athens GA Restaurants, Athens georgia Restaurants, restaurant, Athens, GA

Back to top