0

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

2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by EnderX
1

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.

Votes + Comments
Useful information to remember.
0

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?

0

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?

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.