jatin_sanghi
3rd November 2006, 06:59
Hi All,
How can we start the jobdaemon in 000 company.
I'am working on LN6.1 SP1, HP Unix environment and i have 1-2 jobs regarding the application locks removal and purge print queues that are generated in 000 company.
Now the issue is I don't want to use session ttaad5206m000 as it start the job daemon in the foreground and doesn't simply close unless you kil it.
Jobdaemon is working well for all companies in backgroud ( started through /etc > ./rc.startjobdm), but doesn't start the jobs in 000.
could anybody suggest any command to make job daemon work for 000 company in the backgroud.
Thanx in advance and regards,
Jatin Sanghi
kathuria
3rd November 2006, 07:16
Hi,
To remove application locks as well as print queues by using database level and OS level programming. You have to simply write one PL/SQl in oracle similar like Trigger and fire that PL/SQL at OS level by using OS job management. This will definatly help you.
This will helpful because your company number always will remain same.
Regards,
Sanjay Kathuria
NPRao
3rd November 2006, 20:09
Now the issue is I don't want to use session ttaad5206m000 as it start the job daemon in the foreground and doesn't simply close unless you kil it.
You must be starting it from your worktop. You can use it command line from Unix and use & so that it can run in background.
Jobdaemon is working well for all companies in backgroud ( started through /etc > ./rc.startjobdm), but doesn't start the jobs in 000.
You just have to set the BSE_COMPNR (company number) to 000 and it will run too.
Refer to the thread - Job question(s) (http://www.baanboard.com/baanboard/showthread.php?t=9287&highlight=DS_SERVER)
To remove application locks as well as print queues by using database level and OS level programming. You have to simply write one PL/SQl in oracle similar like Trigger and fire that PL/SQL at OS level by using OS job management.
Sanjay, I am not sure why rebuild the wheel -
Refer to the $BSE/etc/rc.start script ->
#Optional Remove all Application Locks
#${BSE}/etc/rc.start_remall
ttaad3221m000 - Purge Device Queue - add it to a BaaN job in Company 000.
ssamuel
16th November 2006, 17:05
For system jobs (locks, device que, etc) you can execute the job from an OS scheduler (i.e. cron) to run in the background.
The job must be created in co 000 and executed by a user in company 000.
1. Create user job000 - company 000
2. copy $BSE/etc/rc.startjob script --> rc.startjob000
and modify user name to the company 000 user.
# 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=job000 ;export USER
3. Create a job in 000 called LOCKS to remove the appl locks.
4. Create a script LOCKS that contains the system vars and the job name
Linux example:
#!/bin/bash
BSE=/ln/bse
BSE_TMP=${BSE}/tmp
BAMODE=1
export BAMODE
#TERM=vt100
#export TERM
MANPATH=${MANPATH}:${BSE}/doc/man
ORACLE_HOME=/ln/oracle/product/10.2.0/client1
ORACLE_SID=LNDB
SHLIB_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/lbin:$ORACLE_HOME/lib64:$ORACLE_HOME/bin
PATH=${BSE}/bin:${PATH}:$ORACLE_HOME/bin
export BSE BSE_TMP PATH LANGUAGE MANPATH ORACLE_HOME ORACLE_SID SHLIB_PATH
#rc.stopjob100
#cd /ln/bse/etc
/ln/bse/etc/rc.startjob.job000 LOCKS
4. When the os script LOCKS is executed, the job is activated in the background
Remember that the user executing the job must be assigned to the company in which the job will run. And, that user must be identified in the $BSE/etc/rc.startjob script.
Sue Samuel
jatin_sanghi
20th November 2006, 06:32
Hi All,
Thanx a lot for your advise.
My jobs are running fine now.
I have created a user with default comp 000 and then logged into server through telnet and that user. Then started the jobdaemon ./rc.startjobdm and it worked well.
Jobs were put in queue.
thanks and regards,
Jatin