I think vbe has spotted it. Perhaps your Ubuntu has a normal unix crontab syntax which does not contain the username field (i.e. "root"). Is the crontab you are editing called "root". Are there any other entries in the file which could use to compare.
You can't beat actually posting the error messages verbatim. The 127 error means that cron can't find the file to be executed. The error suggests that it may be trying to execute a file called "root"? The MTA error means that cron can't find your Mail Transport Agent - maybe because you don't have email configured?
I know that I don't have my mail configured because I've never had to. Where do I configure it? I know how to run servers and websites, not errors on linux I'll remove the 'root' before the file and see what the syslog says. Also, the crontab I'm editing isn't called root, I just use 'crontab -e' to edit it. Oh, and should I put all these in the root's crontab (sudo crontab -e), so that it won't have a problem running the script, as I know that hddtemp and poweroff will need to be root.
By the way, what does verbatim mean?
---------- Post updated at 07:11 PM ---------- Previous update was at 07:01 PM ----------
Same thing. Here's the current syslog:
---------- Post updated 27-11-11 at 03:21 PM ---------- Previous update was 26-11-11 at 07:11 PM ----------
I solved it!
Thanks for your help guys. I amended the script like so:
Verbatim is a word means "repeating the exact words that were used". When dealing with computer error messages you must report the whole message exactly as it appeared on the screen - complete with all punctuation, space characters, upper/lower case etc..
Glad it's working. The "man" pages for Ubuntu cite two different formats for a crontab file (without and with a username). I'm glad that yours is a normal "unix" format crontab.
Setting up basic unix mail should be straightforward. Source a "how to" manual for your Operating System. Internet mail is more difficult and will depend on your environment.
Good evening, ive got this cron to be run:
if i run this manually it doesnt work,it takes me to the prompt again
/export/app/CO/opge/scr/Informe_parametros_colombia.ksh >/dev/null 2>&1
here is the code fragment:
coopge@coopge: opge PRODUCCION>more... (1 Reply)
I am trying to setup a cron that runs a script to update my ip for my domain name every time I reboot and checks if my ip changes every 5 minutes and if it does then I update it. I am running Ubuntu server 12.04.
The file /etc/cron.d/ipupdate contains
#
#
# Run ipupdate
#
#
/5 * ... (3 Replies)
Hi friends,
today i created a cron job , registered the crontab file associated but dont know why the cron is not getting executed at the right time.??
content of Crontab file :
21 15 * * * /subrat/myt
i wanted to execute the script myt on 15:21 PM of everyday.
the script myt... (2 Replies)
Hi all!!
I have a nerve-wracking concept (probably for me!!) which is not understood. My crontab entry looks this way.
33 09 22 3 * /home/myexp.sh "Bgp4 ALL" >/dev/null 2>&1
But cron gets started occasionally. Sometimes it does. Sometimes it does not. And sometimes it hangs in the middle (I... (1 Reply)
how to store a date into file?
and how we can access date from the file?
---------- Post updated at 06:09 AM ---------- Previous update was at 06:08 AM ----------
how we can store date in file? (1 Reply)
Dear Friends,
I am running a script which runs a select query from a sybase table and outputs the result (1 row) into a .txt file in unix. When I run the script manually it behaves normally. However it doesnt run in crontab.
#!/usr/bin/ksh
. /opt/ivb/config/set_env
... (1 Reply)
Hi,
I've created a cron job for a script with a rsync command in it. The script is named pull.sh and contains the following line :
What it is supposed to do is pull backup files from the production server of my company to my local server. It should also generate the log file (output.log)... (1 Reply)
Hi there,
this time a have a other problem :)
i will start a script over the cron.
if i start the script manual (per command) it works without any problems, but over the cron it doesent work.
my cron looks like this:
26 15 * * * /path/scriptname.sh 2> /path/error.log
there is no... (3 Replies)
Hi, I am having a few problems with cron.
I have created a shell script (to rotate www logs - this works) and then did the following (as root)
#crontab -e
2 0 * * 3 /cron_scripts/wwwlogs.sh
?
w
?
q
#
crontab -l
entry not shown e.g. it did not show what I had just writern
I then... (6 Replies)
I'm having serious problems running cron. I want to create midnight backups of my files on my unix server and there is something wrong with cron.
Here is what I do:
First I saw that cron is running (while logged on as root) by typing "ps -aedf|grep cron" and I noticed that there is 1 instance... (4 Replies)