Using Crontab?

Thread Solved

Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Using Crontab?

 
0
  #1
Sep 12th, 2006
First: if this is in the wrong place, I apologize.

I'm a newcomer to Linux, but I'm trying to learn what I need to in order to correctly use it.

I've got a program I need to run multiple times, without my having to do anything. The book on Linux I've got mentioned the 'crontab' command, but I'm not sure I understand how to use it correctly. I tried to set up a call to the program I needed the way the book demonstrated, and nothing happened. Similarly, I've looked at a couple of websites found via a google search, but they simply showed the same kinds of examples as the book.

Basically, I need to know the correct way to set up a job with crontab, and the correct way to make sure it runs when it's supposed to.

I'm not sure if this information is needed to determine the cause, but I think the server I'm working on is running Suse 9. (Remote connection; I may not be correct in this.)

Anyone out there willing to take pity on this ignorant newbie?

Thanks in advance,
-EnderX
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Using Crontab?

 
1
  #2
Sep 12th, 2006
Is cron actually running? It won't do any good to setup the process to run every x hours, if cron itself isn't. You can check what's currently running by typing "ps -aux" into the command prompt. It might be quite a long list, so you may want to pipe it:
ps -aux |more
And if cron or something with "cron" isn't listed, then you know what the problem is.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Re: Using Crontab?

 
0
  #3
Sep 13th, 2006
I tried that command. There is an entry in the output called /usr/sbin/cron. Is that what I'm supposed to be looking for?

I may have stumbled onto a different problem for this. I've tried running the program I'm working with seperately, and it doesn't seem to properly if I'm not in the same directory as it. I've been trying to use the full pathname for the program though, so I don't understand why it doesn't want to work. Any suggestions?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Using Crontab?

 
0
  #4
Sep 13th, 2006
I tried that command. There is an entry in the output called /usr/sbin/cron. Is that what I'm supposed to be looking for?
Yes.
I may have stumbled onto a different problem for this. I've tried running the program I'm working with seperately, and it doesn't seem to properly if I'm not in the same directory as it. I've been trying to use the full pathname for the program though, so I don't understand why it doesn't want to work.
What happens? Does bash give you an error, or does the program itself have trouble running?
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Re: Using Crontab?

 
0
  #5
Sep 15th, 2006
Sorry for not responding earlier, but I believe I found the problem.
As I said, I was attempting to type the entire path name into the setup, and it wasn't running correctly. But by including a cd command to get to the correct directory, then ./ing my program, it seems to be working properly.

Thanks for the assistance.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum
Thread Tools Search this Thread



Tag cloud for *nix Software
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC