crontab problem

Hello,

I have to problem with crontab.
It doesn’t work good, and I don’t know how can I start a c program from crontab.
Please, help me!

Bereghy13,

Can you post what you’ve tried so far (ie your crontab file, the crontab command you are using etc).

Tim

41 00 * * * echo-n " "; date; echo > /dev/con1

Bereghy13,

I’m going to assume that cron is running on your system. I’m going to further assume that you are doing these tests as root.

Looking in the doc’s on crontab there is an exact example of what you are trying but they instead show the line as:

41 00 * * * (echo-n " "; date; echo) > /dev/con1

Note 1: You realize this echo is only going to happen at 41 minutes past midnight.

Note 2: This echo’s to console 1. If you are running your tests in Photon, you aren’t going to see /dev/con1 because it’s going to be hidden by Photon.

Tim

And If I have a program, I would like to do same that the echo. This not use the console, but it not running same the other example.

0,10,20,30,40,50 * * * * /mymap/myprog

Bereghy13,

You didn’t confirm whether these assumptions were true:

Now for your program

0,10,20,30,40,50 * * * * /mymap/myprog

Is /mymap/myprog the fully quantifed path name to your program? cron doesn’t have any default pathing information so if your program is in /root/mymap/myprog you’ll need the full path in the crontab.

Tim

Yes, the cron is running, and I’m doing these tests as root.
The /mymap/myprog is the full path, but doesn’t work thecrontab.

Bereghy13,

OK, on my machine here I just did the following:

  1. Logged in a root
  2. cron & (start cron)
  3. crontab (run crontab from stdin because I have no crontab file for root)
            • /usr/photon/bin/phcalc CTRL-D (have cron start the photon calculator app every minute)

and every minute the photon calculator app is started.

So I suggest you start by repeating what I did (you may have to remove any existing crontab file for root) and get your /mymap/myprog running once every minute. That’s a starting point.

Tim