Solved

crontab

Posted on 1997-12-03
5
476 Views
Last Modified: 2013-12-26
Shalom.


Maybe you can tu help me about the following question:

I have user and him name is alex, this user writed aplication "getNews".- This aplication is under
/net/bio/APPS/getNews.-
The him classpath is: CLASSPATH=/usr/java/classes:/usr/local/weblogic/classes:/usr/people/alex/
java/classes:,:/usr/local/weblogic/lib/irix/oracle:/net/apps/classes.

I need tu run this aplication per day, for that I wanted to put in the crontab, so!I put there but
don't receive answer.-

My expresion in the crontab is the following:
0 4 * * */sbin/sh/usr/people/alex/getnews.sh >/usr/people/alex/getnews.log
--------------------------------------------------------------------
My question about that is: Maybe not working because I created this crontab as root but with
shells of alex.?-
or maybe didn't create correct this crontab, or I need to put him classpath to my env?
----------------------------------------
Please If you have any solution for me, you could to sent to me e-mail

thanks
0
Comment
Question by:rachel1
  • 2
  • 2
5 Comments
 

Author Comment

by:rachel1
ID: 1295729
Edited text of question
0
 
LVL 1

Expert Comment

by:dhughes111797
ID: 1295730
Is there anything in the root mailbox? Usually, if there is
a problem with a cronjob, the owner of the job will get mail.
If you want to put the cronjob under the alex account, you
can use crontab -e alex
0
 
LVL 1

Expert Comment

by:dhughes111797
ID: 1295731
Is there anything in the root mailbox? Usually, if there is
a problem with a cronjob, the owner of the job will get mail.
If you want to put the cronjob under the alex account, you
can use crontab -e alex
0
 
LVL 3

Expert Comment

by:rickyr
ID: 1295732
Hi...

What OS and Hardware you got? Did you edit the file directly with vi? You can't do this in Solaris, as cron only recognises crontabs that have been edited with the crontab utility, in the Bourne Shell it's......

#> EDITOR=vi
#> export EDITOR
#> crontab -e "user Name"

I don't know what type of UNIX you have, but maybe you can work out the equivalent for your OS. The users crontab will run programs as that user, but only that user can edit his own crontab file, unless of course you are root. Then when you initialise the users crontab it will run with his permissions. As a general rule, I always su to that user, then edit the crontab. That way you cant accidently edit the wrong one.

regards
0
 
LVL 3

Accepted Solution

by:
rickyr earned 50 total points
ID: 1295733
Hiya...
I just noticed that you have irix in a pathname, so I'll asume that you are running irix. I have done this in the past

#crontab -l > root.cron
#vi root.cron
--->edit file here<---
#cat root.cron | crontab

regards
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 147
Generic progress indicator 6 117
dog bark java program 15 105
x-bar in Google Sheets 2 69
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question