esh and cron problem

Hi, Group,

  1. On my RTP, the esh shell is unable to run scripts. When:

$ esh my_script

it turns out:

Line too long…

What’s wrong with esh ? Sequently, I had to embed sh into my buildfile.

  1. About cron utility, I edit my_crontab as follows:
    1,2,3,4,5,6,7,8,9 * * * * echo -n " "; date; echo > /dev/con1
    ( Display the current time on the system console every minute . by the helps)

Then I :

crontab /home/peter1/crontabs/my_crontab

I can see my crontab entry through crontab -l command .
At the end, I invoke cron server and wait.

cron &

But nothing happens.

Thanks.

Peter Z

  1. esh is for embedded and just a subset of the normal shell. It has its own restrictions due to the resource limit. “Line too long” is probably just one of them. Can you make sure your script doesn’t have long lines? I just tried with a test_script.sh :
    echo testing
    and
    esh test_script.sh
    works fine for me.

  2. You cron may be working and it is just you don’t see it. Your list of commands in crontab are separated by ; and only the last command is redirected to the /dev/con1. So you will only “see” a blank echo output on the console which probably didn’t catch your eye. Try the following
    1,2,3,4,5,6,7,8,9 * * * * date > /dev/con1
    and you should see the date output printed.

Hi, noc,

1, I’ve tried the script(“echo testing”) that you suggested. The problem remains the same.

2, “1,2,3,4,5,6,7,8,9 * * * * date > /dev/con1” not work,
and "1,2,3,4,5,6,7,8,9 * * * * (echo - n " “; date; echo) > /dev/con1” either.
Please help me solve the problem of “cron”. I need “cron” running on my project.

I’m suspecting the malfunctions of the above have something wrong the installation of my RTP.
Probably I should set some configurations. What do you think ?

Peter

Sounds like you are running a very old version of QNX 6 which probably has a bug in “esh” and “cron”. Try to test it in the latest QNX 6.3 and see if the problem still exists.