LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problems scheduling jobs with cron (https://www.linuxquestions.org/questions/linux-general-1/problems-scheduling-jobs-with-cron-42145/)

ferrantepunto 01-20-2003 10:16 AM

Problems scheduling jobs with cron
 
Hi there,

I'm trying to automate a backup job made with taper using cron. I'm having a lot of trouble making it work.

I've read the NHF about scheduling, the man pages and I can't find the failing cause of the job.

I'm using Red Hat 8, and I've tried putting the command line in the /etc/crontab file, using the crontab -e to add the job to my user's crontab file, manually editing the files as root, but the job refuses to start.

Any ideas will be greatly appreciated.

One more question: If I put something like

10 10 * * * echo Hello!

Where can I expect the output? Terminal Window, a file? Where?

Thanks for your help.

Cheers.

turnip 01-20-2003 10:46 AM

That would end up getting mailed to root@localhost.
Usually cron mails stdout to root. to stop that you can do something like

echo "hello world" >> /dev/null 1>&2

ferrantepunto 01-20-2003 10:55 AM

Hi,

Thanks for your reply.

I'm trying to check if there's any mail on the root account, but nothing. It is like the job is not running at all.

(I 'm using mail -u root, but it says that there is no mail for root).

Any more ideas?

jstu 01-20-2003 01:40 PM

Do you know if mail is working can you send mail to other users from that machine. Or is there an alias set for root in /etc/aliases

ferrantepunto 01-24-2003 03:14 AM

Hi there,

Yes, you were right. Sendmail was not installed on the system, and therefore, I was not able to send messages to users. I managed to install it and I tested it successfully.

Somehow, I managed to start cron jobs, but I think it is behaving erratically, because sometimes the jobs start and sometimes not (because sometimes I receive messages in the root account and sometimes not).

I'm using RedHat 8, is there any way to ensure that the jobs are running?

Cheers.

KayJay 01-24-2003 07:05 AM

plz post the cronjob and the output from root's mailbox here, so we can take a look @ it


All times are GMT -5. The time now is 10:49 PM.