Running a cronjob

Posted by Ed01 on Server Fault See other posts from Server Fault or by Ed01
Published on 2010-12-22T16:39:31Z Indexed on 2010/12/22 16:56 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

've been puzzling over cronjobs for the last few hours. I've read documentation and examples. I understand the basics and concepts, but haven't gotten anything to work. So I would appreciate some help with this total noob dilemma.

The ultimate goal is to schedule the execution of a django function every day. Before I get that far, I want to know that I can schedule any old script to run, first once, then on a regular basis.

So I want to: 1) Write a simple script (perhaps a bash script) that will allow me to determine that yes, it did indeed run successfully, or that it failed. 2) schedule this script to run at the top of the hour

I tried writing a bash script that simple output some text to the terminal:

#!/bin/bash
echo "The script ran"

Then I dropped this into a .txt file

MAILTO = *****.******@gmail.com
05 * * * * /home/vadmin/development/test.sh

But nothing happened. I'm sure I did many things wrong. Where do I start to fix all of this?

© Server Fault or respective owner

Related posts about scripting

Related posts about cron