Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Administration & Installation (http://www.baanboard.com/baanboard/forumdisplay.php?f=2)
-   -   Job Scheduling Problems Linux (http://www.baanboard.com/baanboard/showthread.php?t=70360)

litrax 22nd August 2017 18:34

Job Scheduling Problems Linux
 
Hi there,

I'm having an issue with the job-scheduling when I start a job via shell and I'm hoping somebody can give me some tips or had this issue before:

I'm changing the server from Solaris to Linux.
On solaris a job was started in the following way:
Job Data:
Code:

Job = IMPORT_DATA
Use external Sched = No
Periodical = Yes
Suspend Job Until Next Execution = Yes
Period = 1 Minute
Next Execution Date = a date/time in the future
Status = Free

Now to start the job and let it run forever we used the shell script
root> su - job100
job100> $BSE/rc.startjob_job100 import_data
(Note: In this script the job is started via the session ttaad5203m000)

The job started, was then shortly in the state "Running" and then updated the last and next runtime and was in the state "Waiting" for the next minute, cause this is the given period for this job.
And the job ran every minute and in between it was in the "Waiting" state. Everything was as expected.

Now on the new Linux server the job runs once, updates the times, then is in the state "Waiting" but runs never again!? It remains in "Waiting"- state forever.
This way to start a periodically job cannot longer be used in our new environment. But why?

I checked some logs and the processes but nothing unusual.
Shure we can set it up as job daemon but the question remains:
Why is this mechanism broken?


The help of the field "Suspend Job Until Next Execution" clearly states:
Quote:

Indicates whether the periodical job must be executed automatically after last execution. After execution of a periodical job, the next execution date is automatically updated according to the given period and/or calendar date.

If this check box is selected, the job is suspended until the next execution date. For jobs started by the Activate Job (ttaad5203m000) session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat, the job’s status is set to Waiting. The job is automatically restarted at every next execution date that is defined in the calendar or by the interval.

If this check box is cleared, the job runs once and is then stopped. For jobs started by the Activate Job (ttaad5203m000) session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat, the job’s status is set to Free. To restart the job, you must manually start the Activate Job (ttaad5203m000) session, the UNIX shell program rc.startjob, or the Windows batch file startjob.bat.
Any suggestions where to find the bug. Why the running job- bshell doesn't start the job again at the next execution interval?


[UPDATE]
Out of curiosity I changed the field "Suspend Job Until Next Execution" from "Yes" to "No". Then I set the next running date in the near future. Then I started the job via the script.
Normaly it should execute the job at the given time, then it should set the job status to "Free" and update the next running time according to the interval and then exit the bshell.
But it also remains in the state "Waiting" and never executes anything. The bshell process never ends. !?!? Very curious...

günther 23rd August 2017 08:07

Hi litrax,

we're on HP-UX and we use 'cron' to start our Jobs instead of the baan scheduler. Maybe that's an option for you?

Regards
Günther

litrax 23rd August 2017 08:14

Yeah. I forgot to say that because I wanted to hold it short,
but I sure use the cron to start all jobs.

Even for the one I mentioned with interval 1 minute and external planing turned off. So in case of an error I only have to make sure the old process is gone and the status is free again. The cron will restart the job the next minute and I don't have to take care of it. ;)

I did crawl through inforxtreme too, but just tips how to debug or to create dbs.logs .

litrax 4th September 2017 16:59

Thank you all for your self-sacrificing help.
Appreciate that


All times are GMT +2. The time now is 23:01.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com