Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, January 27, 2010

Setting Crontabs in Mac OS X

It has been a while since I last posted, but I have a new tutorial for everybody... Settings cron jobs through the "crontabs" command in an SSH terminal.

To start, open up the terminal, and type ssh myUsername@myUrl. The terminal program will then prompt you for your password to access the remote server.

Once you have been successfully authenticated and logged into your remote server, you may then begin sending commands to it.

The basic crontab commands:

crontab -l   (display the currently loaded cron jobs on the server)

crontab -e   (add, edit, and delete individual cron jobs on the server, this will be displayed as a table)
  • Once this command has been issued, you simply begin typing text to invoke the INSERT mode.
  • Example cron: */5 * * * * http://myurl.com/index.php
    • This cron simply runs the "http://myurl.com/index.php" url every 5 minutes
    • Use the format [minutes (0 - 59)] [hours (0 - 23)] [day of month (1 - 31)][month (1 - 12)][day of week (0 - 6)] [COMMAND]
  • When you are done editing your scheduled cron jobs, simply press ESC, and type :wq to save the changes to the server.
  • That is it for editing crons!

crontab -r   (CAUTION: removes all crontabs stored on the server's crontab file)

crontab -v   (display the last time the crontab file was edited on the server)


If you do not want to type ssh myUsername@myUrl each time you connect, go into the Mac OS X terminal 's top bar and go into the "Shell" drop-down. Once there go to "New Remote Connection..." and add your remote server's details through the graphical interface.

Thanks for visiting my blog!


Saturday, January 9, 2010

iPhone Application Development Update

First off, I would like to welcome everybody to my new blog page. Here I will be posting my computer programming and web development experiences. Shall we get started?

The past 2 weeks I have been diving in to the iPhone SDK and the limited options for programming native applications on the iPhone platform. I started off thinking that it was absolutely required to know Objective-C for programming in Apple's Cocoa and Cocoa Touch frameworks, so I tried to learn Obj-C. Within a day or so, I gave up on that seemingly complex, obscure, ugly language and set out to find a different approach. I soon found PhoneGap; a framework that allows native iPhone apps to be developed in html, css, and, of course, javascript. I programmed in plain javascript (with jQuery) and html for a few days, but once again found there to be some problems. I found DashCode (that came with the Apple SDK), in which I can develop native-looking Mobile Safari applications in javascript. Combining the powers of PhoneGap framework and DashCode, I am now able to use a nice drag-and-drop IDE to build javascript-run, native-looking iPhone applications.

I will release some tutorials on my YouTube channel later on using these tools together, and write another blog post about my upcoming applications.