HPR – cron

In this months Hacker Public Radio is on cron. First let me list out some good introductions to the topic:

  • https://help.ubuntu.com/community/CronHowto
  • http://unixhelp.ed.ac.uk.CGI/man-cgi?crontab+5
  • http://unixgeeks.org/security/newbie/unix/cron-1.html
  • http://en.wikipedia.org/wiki/Cron
  • Virtually the entire show was taken from these links so rather than repeat myself here I suggest you either listen to the show or follow the links yourself. I did give an example of how you might add a script to cron and I’ll list that here.

    username@computer:~$ vi /home/username/bin/hello.bash

    username@computer:~$ cat /home/username/bin/hello.bash
    #!/bin/bash
    echo "hello world"

    username@computer:~$ /home/username/bin/hello.bash
    bash: /home/username/bin/hello.bash: Permission denied

    username@computer:~$ chmod +x /home/username/bin/hello.bash

    username@computer:~$ /home/username/bin/hello.bash
    hello world

    username@computer:~$ export |grep EDITOR
    declare -x EDITOR="vim"

    username@computer:~$ crontab -l
    no crontab for username

    username@computer:~$ crontab -e
    no crontab for username - using an empty one
    No modification made

    username@computer:~$ crontab -e
    no crontab for username - using an empty one
    crontab: installing new crontab

    username@computer:~$ crontab -l
    # m h dom mon dow command
    * * * * * /home/username/bin/hello.bash > /home/username/hello.output 2>&1

    username@computer:~$ cat /home/username/hello.output
    hello world

    Following on from my recommendation of Spud Show last time I’d like to recommend Rathole Radio this time. This is a show by Dan “programmer, musician and full-time layabout from Merseyside, UK.” Lynch aka the UK Outlaw. To quote the man himself “Rathole Radio is a fortnightly Internet radio show and podcast about culture, technology and politics with humour, guests, the best in new music and even exclusive live performances.”

    I love the eclectic sound derived as a result of Dan’s simple motto “I only play stuff I like.”

    Go have a listen.

    This entry was posted in Podcasts. Bookmark the permalink.

    Leave a Reply

    Your email address will not be published.