I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Am I supposed to touch the lines that are bold?
I can't get my script to execute every 15 minutes. any hints.
all the cron is created under my name.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Originally posted by Andres Gonzalez:
the daemon is running (it created the log file). however, my shell didn't do what I was expected to do. So here are some questions.
1) I also got an email, this is some info:
From aegonzal@mydomain Tue Mar 30 16:00:00 2004
Return-Path: <aegonzal@mydomain>
Received: from xx (localhost.localdomain [127.0.0.1])
by xxx with ESMTP id i2V000Q4003445
for <aegonzal@domain>; Tue, 30 Mar 2004 16:00:00 -0800
Received: (from aegonzal@localhost)
by xxx (8.12.5/8.12.5/Submit) id i2V000pL003443
for aegonzal; Tue, 30 Mar 2004 16:00:00 -0800
Date: Tue, 30 Mar 2004 16:00:00 -0800
Message-Id: <200403310000.i2V000pL003443@domain>
From: root@domain (Cron Daemon)
To: aegonzal@domain
Subject: Cron <aegonzal@domain> cd /home/aegonzal; ./myCommand.csh > 1>x.log 2>&1
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/aegonzal>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=aegonzal>
Status: RO
/bin/sh: -c: line 1: syntax error near unexpected token `1'
/bin/sh: -c: line 1: `cd /home/aegonzal; ./myCommand.csh > 1>x.log 2>&1'
I fixed the syntax error, making it output to my x.log. The things that I don't understand are:
1) the FROM is root, that's ok. but the TO is to my local linux email account. I'd previously changed the cron configuration to email to adifferent email account (by modifying the MAILTO parameter in crontab), but it seems it's not picking it up.
2) myCommand.csh executes some lines that can only be executed under my user. Even though my user is the owner of the cron, it should be OK then, right? isn't it root that starts the daemon process?
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
/bin/sh: -c: line 1: syntax error near unexpected token `1'
/bin/sh: -c: line 1: `cd /home/aegonzal; ./myCommand.csh > 1>x.log 2>&1'
1) the FROM is root, that's ok. but the TO is to my local linux email account. I'd previously changed the cron configuration to email to adifferent email account (by modifying the MAILTO parameter in crontab), but it seems it's not picking it up.
2) myCommand.csh executes some lines that can only be executed under my user. Even though my user is the owner of the cron, it should be OK then, right? isn't it root that starts the daemon process?
Originally posted by Andres Gonzalez:
so what I did was (not sure if it's correct):
*/15 * * * * . /etc/profile ; ./myShell.csh
ant it worked. the only problem is when sending emails, I can't get it to send emails to my personal account.
[JE]I've never administered cron, so I'm not sure what you mean by modifying the MAILTO parameter in crontab, but: if that's not working, and the mail is going to the user account's local unix email, try puting a .forward file (text file containing a forwarding email address) in the user's home directory.
the crontab file has a parameter called MAILTO. I read somewhere that you specify in that place where you want the log to be emailed. but it doesn't work.
I didn't understand your .forward solution. can you explain to me.
thanks guys!!!
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Consider Paul's rocket mass heater. |