Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 28th October 2009, 15:56
priyanko's Avatar
priyanko priyanko is offline
Member
 
Join Date: Feb 2008
Location: Hyderabad, India
Posts: 39
priyanko is on a distinguished road
Baan: ERP ln6.1, baan4c, Baan 5c - DB: ms sql , oracle10g - OS: windows2003, Suse Linux, Unix
starting baan job daemon from unix prompt
Baan: Baan IVc4
DB: Oracle 10.2.0.x
OS: Linux - Other
C/S: Both

Dear Baan Tool Experts,

I want to invoke a baan session job tdind0278m000, through job daemon.
The requirement is such that this session has to be run everyday at midnight, it takes approximately 6 hours to complete as it update costing of customized items.

i dont want any manual intervention to start this job i.e I don't want to activate this job from baan session " activate job"

What i tried so far is maintain the job, set the periodic time, and keep the status as free.

Now in the bash shell prompt , I started the job daemon by entering the command " rc.startjbdm". The path $bse/etc. The job daemon starts, but it doesn't invoke the job which has a free status in the maintain job session.

Please guide me to run the job in the background everyday in the stipulated time as mentioned above. Also mention the setup and steps involve in it.

thanks in advance to all the baan gurus.

Regards
Priyanko.
Reply With Quote
Sponsored Links
  #2  
Old 28th October 2009, 17:02
norwim's Avatar
norwim norwim is offline
Guru
 
Join Date: Oct 2001
Location: Germany Moenchengladbach
Posts: 450
norwim is on a distinguished road
Baan: some - DB: more - OS: many
Hi there,

we usually start jobs directly from cron, as usage of job daemon often is a bit confusing.
What I remember is that
a) the job has to have status "in queue" and
b) the projected starting time may not lay in the past
to ensure that the job will be started by the daemon.
Especially b) often caused that jobs weren't started and never would be once a mistake was made - this led to a lot of manual intervention.

If you call a job directly via rc.startjob, it will be executed if the status is "free" and the planned execution date is not taken into account.

hth

Norbert
__________________
Have a nice day
Reply With Quote
  #3  
Old 28th October 2009, 17:49
priyanko's Avatar
priyanko priyanko is offline
Member
 
Join Date: Feb 2008
Location: Hyderabad, India
Posts: 39
priyanko is on a distinguished road
Baan: ERP ln6.1, baan4c, Baan 5c - DB: ms sql , oracle10g - OS: windows2003, Suse Linux, Unix
Dear norbert,
Initially I tried by putting status "in queue" , and then started the job daemon it didnt work out.
The point b) is always taken into consideration. the projected starting time is never in the past.
The job daemon is started, after the projected start time is set, which is always in the future.

I have checked the field for periodic. The start time is always rolled over to the next day, once it is executed by activate job session.
I want to imply the same thing without manual internvention to activate the job. The next execution day should always be rolled over.

I am confused with the rc.startjob. One more important point to specify is that the planned execution date and time has to be taken into consideration as this session job should start at mid night, when no transaction or user is logged in.

So even if i call the job with rc.startjob say at 6:00 in the evening, it should only start at the planned time.

currently the requirement is fulfilled by the session "activate job". It starts the job in the planned execution time. This keeps the current bshell of baan active until the job is completed, which requires a client system to be switched on the whole time.

Please guide me more on the same.
I really appreciate the help incurred.

Regards
Priyanko.
Reply With Quote
  #4  
Old 29th October 2009, 16:08
norwim's Avatar
norwim norwim is offline
Guru
 
Join Date: Oct 2001
Location: Germany Moenchengladbach
Posts: 450
norwim is on a distinguished road
Baan: some - DB: more - OS: many
Hello priyanko,

Quote:
Initially I tried by putting status "in queue" , and then started the job daemon it didnt work out.
As I don't have access to a system atm, I can't look at the rc.startjobd script and only rely on my memory.
IIRC the environment variable USER has to be set in the rc.startjobd script (this specifies the company or more important the PVRC to be used) - if this Baanuser has a different PVRC than the company the session is supposed to run in it won't work.

But again: why don't you start the job via rc.startjob directly? Simply copy the script, enter the appropriate USER and JOB values, export these variables and call your script via crontab - day of week and time set to * and 23 59 will start the session every day one minute before midnight. If my memory is correct, the TERM variable had to be set as well, but this was Baan IV and might be different/obsolete in LN.

good luck

Norbert
__________________
Have a nice day
Reply With Quote
  #5  
Old 29th October 2009, 16:44
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,639
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Crontab !

Quote:
Originally Posted by priyanko View Post
Dear norbert,
Initially I tried by putting status "in queue" , and then started the job daemon it didnt work out.
The point b) is always taken into consideration. the projected starting time is never in the past.
The job daemon is started, after the projected start time is set, which is always in the future.

I have checked the field for periodic. The start time is always rolled over to the next day, once it is executed by activate job session.
I want to imply the same thing without manual internvention to activate the job. The next execution day should always be rolled over.

I am confused with the rc.startjob. One more important point to specify is that the planned execution date and time has to be taken into consideration as this session job should start at mid night, when no transaction or user is logged in.

So even if i call the job with rc.startjob say at 6:00 in the evening, it should only start at the planned time.

currently the requirement is fulfilled by the session "activate job". It starts the job in the planned execution time. This keeps the current bshell of baan active until the job is completed, which requires a client system to be switched on the whole time.

Please guide me more on the same.
I really appreciate the help incurred.

Regards
Priyanko.
Hello,

as Norbert said:

Job for every FRIDAY :

Entry in crontab of the jobuser:
35 00 * * 5 export USER=jobs4c;sh /daten/bse/etc/rc.startjob FR1

At 35 Minutes after midnight it's started, the job in BaaN is set to 00:40 (40 minutes after midnight).

So it is set for every day an it works since > 10 Years without problems !

Regards
__________________
//Bernd
Reply With Quote
  #6  
Old 3rd November 2009, 06:47
priyanko's Avatar
priyanko priyanko is offline
Member
 
Join Date: Feb 2008
Location: Hyderabad, India
Posts: 39
priyanko is on a distinguished road
Baan: ERP ln6.1, baan4c, Baan 5c - DB: ms sql , oracle10g - OS: windows2003, Suse Linux, Unix
Dear Nobert.

I am printing the script of the rc.startjobdm

BSE=/baan4/bse
BSE_TMP=/baan4/bse/tmp
export BSE BSE_TMP

PATH=$BSE/bin:$PATH
export PATH

PLATFORM=`uname`
if [ ${PLATFORM} = "Linux" ]
then
ECHO="echo -e"
else
ECHO="echo"
fi

# It turned out that the TERM variable could be unset when running in a cron
#TERM=vt100 ;export TERM

# If you want to use several companies you can create several users for e.g.
# root who probably is running this script. If so, copy this script and use
# the next line to define the USER variable (<root100> is just an example).
#USER=<root100> ;export USER
BAMODE=1
export BAMODE
if [ ${#} -eq "1" ];then
if [ $1 = "-u" -o $1 = "-U" ];then
${ECHO} "Use : rc.startjobdm [-debug]\n"
exit
fi
if [ $1 = "-DEBUG" -o $1 = "-debug" ];then
unset BAMODE
fi
fi

DS_SERVER=ba
export DS_SERVER
if [ ${#} -eq "1" ];then
if [ $1 = "-DEBUG" -o $1 = "-debug" ];then
ba6.1 ttaad5206m000 2>${BSE_TMP}/rc.startjobdmerr
else
ba6.1 ttaad5206m000 2>${BSE_TMP}/rc.startjobdmerr &
fi
else
ba6.1 ttaad5206m000 2>${BSE_TMP}/rc.startjobdmerr &
fi



In the above script , do i have to mention the user name which created the job. where do i mention the user name.
The job is created by the user "bsp"
The bsp user cant start a job daemon though , permission is not there for user bsp, but i can start a job daemon by user named "root".
Please guide me regarding setting up the enviornment variable of user in the script and also if other info has to be maintained.

Regards
Priyanko.
Reply With Quote
  #7  
Old 3rd November 2009, 15:06
jclju1's Avatar
jclju1 jclju1 is offline
Guru
 
Join Date: Jan 2002
Posts: 554
jclju1 is on a distinguished road
Baan: Baan IV, Baan 5.0c, SSA ERP LN 6.1 - DB: bisam, Oracle, Informix, Sql Server - OS: Unix (all), Windows
You have to change line
Quote:
#USER=<root100> ;export USER
into
Quote:
USER=root100 ;export USER
User root100 must exists in application, must be root on OS level and must be placed in right company.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with starting baan job from OS baanfin06 Tools Administration & Installation 4 18th September 2006 09:56
ottdllbw functions in jobs (Baan on Unix server) ~Vamsi Tools Development 0 8th October 2001 20:55
BSP-US (LLC) added as a Baan Education Alliance svandenh General Discussion & Chat 1 20th August 2001 19:44


All times are GMT +2. The time now is 19:26.


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