Solved

crontab

Posted on 1997-12-03
5
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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