944,052 Members | Top Members by Rank

Ad:
Sep 12th, 2006
0

Using Crontab?

Expand Post »
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
Similar Threads
Reputation Points: 483
Solved Threads: 1
Posting Shark
EnderX is offline Offline
999 posts
since Aug 2006
Sep 12th, 2006
1

Re: Using Crontab?

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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Sep 13th, 2006
0

Re: Using Crontab?

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?
Reputation Points: 483
Solved Threads: 1
Posting Shark
EnderX is offline Offline
999 posts
since Aug 2006
Sep 13th, 2006
0

Re: Using Crontab?

Quote ...
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.
Quote ...
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?
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Sep 15th, 2006
0

Re: Using Crontab?

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.
Reputation Points: 483
Solved Threads: 1
Posting Shark
EnderX is offline Offline
999 posts
since Aug 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Applications and Software Forum Timeline: Dock for Linux
Next Thread in Linux Applications and Software Forum Timeline: DHCP with redhat 9





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC