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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th January 2007, 15:50
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
Start job from crontab, execution date
Baan: Baan IVc
DB: Informix DS 7.31.UD(x)
OS: Solaris 9 (SunOS 5.9)
C/S: Server

At the moment I'm starting a job from the crontab with rc.startjob.
In Baan the period is set at every day.

The job can't start on sunday, so I changed that in the crontab, but in Baan I can't select that.
The problem is that when the job isn't executed on sunday, the next execution date isn't increased and the job will never run again unless I manually increase the next execution date.

I could create a script to set the next execution date, but isn't there a better solution.

Can't I just start the job directly from crontab?
I can do that if I deselect period, but than the job wil be deleted after it's done.
Reply With Quote
  #2  
Old 10th January 2007, 16:11
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,653
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
Create a job for day !

Quote:
Originally Posted by Roeland View Post
At the moment I'm starting a job from the crontab with rc.startjob.
In Baan the period is set at every day.

The job can't start on sunday, so I changed that in the crontab, but in Baan I can't select that.
The problem is that when the job isn't executed on sunday, the next execution date isn't increased and the job will never run again unless I manually increase the next execution date.

I could create a script to set the next execution date, but isn't there a better solution.

Can't I just start the job directly from crontab?
I can do that if I deselect period, but than the job wil be deleted after it's done.
Hello,

create this job for :
Monday, Tuesday, Wednesday .... with period = 1 week .
So in cronab of your jobuser you will execute :

00 15 * * 1 EXPORT USER=jobuser;sh $BSE/etc/rc.startjob monday
00 15 * * 2 EXPORT USER=jobuser;sh $BSE/etc/rc.startjob tuesday
00 15 * * 3 EXPORT USER=jobuser;sh $BSE/etc/rc.startjob wednesday

and so on.

This takes the execution of the jobs to the defined day, no other execution day has to be set in BaaN.

Regards
__________________
//Bernd
Reply With Quote
  #3  
Old 10th January 2007, 16:49
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
yes, that is a solution, but I have multiple jobs and where also monitor these jobs with external applications. I prefer another solution.
Reply With Quote
  #4  
Old 10th January 2007, 17:30
ecarceller ecarceller is offline
Member
 
Join Date: Jul 2004
Location: Scottsdale, AZ, USA
Posts: 95
ecarceller is on a distinguished road
Baan: BaanIVc4 BaanVc - DB: SQLServer2000 Oracle Informix - OS: AIX HPUX Solaris Win2000
I see no problem here...

...I might be missing something.

Your statement:

"...the job will never run again unless I manually increase the next execution date."

is incorrect

Drop the use of job daemons completely
In Baan set up job periods to 1 minute for all your jobs
Do all your scheduling in cron

The only time next execution date and time can mess up your jobs is if they are in the future at the time cron kicks off the job. It will stay in status waiting until the specified next x d&t arrives.
Reply With Quote
  #5  
Old 10th January 2007, 18:08
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
Quote:
Originally Posted by ecarceller View Post
Drop the use of job daemons completely
How can I do this? Is this a unix process?

I also read on multiple thread's on this forum that the job should still start when the execution date is passed, but for some reason this isn't the case here.
Reply With Quote
  #6  
Old 10th January 2007, 18:46
ecarceller ecarceller is offline
Member
 
Join Date: Jul 2004
Location: Scottsdale, AZ, USA
Posts: 95
ecarceller is on a distinguished road
Baan: BaanIVc4 BaanVc - DB: SQLServer2000 Oracle Informix - OS: AIX HPUX Solaris Win2000
Job daemons

If you are not aware of job daemons you most likely are not using them.

Job daemons are Baan processes that run in background and start jobs based on the frequency/calendar defined in baan.

They are kicked off using $BSE/etc/rc.startjobdm which at the very bottom runs this:

ba6.1 ttaad5206m000 2>${BSE_TMP}/rc.startjobdmerr &

Search for that tools session name among your OS processes to see if you have one running:

ps -fe|grep ttaad5206m000

I doubt you do.
Reply With Quote
  #7  
Old 11th January 2007, 09:36
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
Quote:
Originally Posted by ecarceller View Post
They are kicked off using $BSE/etc/rc.startjobdm which at the very bottom runs this:

ba6.1 ttaad5206m000 2>${BSE_TMP}/rc.startjobdmerr &
No, I'm not using the job daemon then:
ba6.1 ttaad5203m000 2>${BSE_TMP}/rc.startjoberr.1 &
Reply With Quote
  #8  
Old 11th January 2007, 10:07
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
I think it works now.
I changed the settings to 1 minute.
The mistake was the enddate. That wasn't changed since '99

Thanks for all the help!
Reply With Quote
  #9  
Old 15th January 2007, 13:11
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
Looks like it still doesn't works.
When I run it now (15/1/2007) it won't start.
/baan/bse/etc/rc.startjob.root PROD1 /tmp/job.prod1
screenshot
Reply With Quote
Sponsored Links
  #10  
Old 15th January 2007, 13:28
Kozure Ohashi's Avatar
Kozure Ohashi Kozure Ohashi is offline
Guru
 
Join Date: Dec 2003
Location: Tokyo-Otsuka
Posts: 324
Kozure Ohashi is on a distinguished road
Baan: Baan IV c4 SP 19, ERP LN 6.1 FP3 - DB: 10g R2 - OS: Linux SLES 10 64 Bit
Pleas post more info.

Please post your script and the directory (permissions).

Regards,

Kozure
Reply With Quote
  #11  
Old 15th January 2007, 14:56
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
Code:
drwxr-xr-x   2 bsp      bsp         1024 Jul 26  2004 .
drwxr-xr-x  28 bsp      bsp          512 Jul 26  2004 ..
-rwxr-x---   1 bsp      bsp         1405 Jul 26  2004 rc.startjob.root
Code:
#!/bin/ksh


BSE=/baan/bse
BSE_TMP=/baan/bse/tmp
export BSE BSE_TMP
PATH=$BSE/bin:$PATH
export PATH

TERM=vt100              ;export TERM
USER=root100;export USER


if [ $# -lt 1 ];then
        echo "Usage : rc.startjob <jobname> [jobok_file]"
        exit 1
fi
if [ $1 = "-U" -o $1 = "-u" ];then
        echo "Usage : rc.startjob <jobname> [jobok_file]"
        exit 1
fi

#jobok_file contains the characters "OK" if the job was successful !
#If jobok_file is not specified, then  output is written to $BSE/tmp/job

BAMODE=1                ;export BAMODE
DS_SERVER=ba            ;export DS_SERVER
BSH_JOB=$1              ;export BSH_JOB

if [ $# -gt 1 ];then
        BSH_JOBOK=$2    ;export BSH_JOBOK
#       echo $BSH_JOBOK
fi

ba6.1 ttaad5203m000 2>${BSE_TMP}/rc.startjoberr.1 &
Reply With Quote
  #12  
Old 15th January 2007, 17:09
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,

I guess (from the name root100) that you do the same as we do here, that is to start baanjobs via roots crontab. The job has execution permission for user bsp and group bsp, not for root. Have you tried to change the permissions? I just did a test, although I could execute a shell-script with permissions like yours from prompt, it didn't execute from crontab.
What happens when you call the script with "sh PATH/rc.startjob.root" in crontab?

A job in Baan that has status 'free' should be executed regardless of the entry in field 'next execution date' when started via ttaad5203m000.

Add something like 'date > /home/bsp/did_i_run_or_not' in your rc.startjob.root script to check whether the script was started at all.

Good luck

Norbert
__________________
Have a nice day
Reply With Quote
  #13  
Old 15th January 2007, 17:22
ecarceller ecarceller is offline
Member
 
Join Date: Jul 2004
Location: Scottsdale, AZ, USA
Posts: 95
ecarceller is on a distinguished road
Baan: BaanIVc4 BaanVc - DB: SQLServer2000 Oracle Informix - OS: AIX HPUX Solaris Win2000
Look for errors or hints on what's going on in these files (check them right after the job's run time)

$BSE/tmp/job
${BSE_TMP}/rc.startjoberr.1
$BSE/log/* (log.ba6.1 and log.bshell might have something)

Also try to send standard output and standard error to files you can review after the run (or run time) in your cron line. Something like this:

0 12 * * 1-6 /usr1/baan/bse/etc/rc.startjob THEJOB > /home/bsp/stdout 2> /home/bsp/stderr
Reply With Quote
  #14  
Old 15th January 2007, 17:49
Kozure Ohashi's Avatar
Kozure Ohashi Kozure Ohashi is offline
Guru
 
Join Date: Dec 2003
Location: Tokyo-Otsuka
Posts: 324
Kozure Ohashi is on a distinguished road
Baan: Baan IV c4 SP 19, ERP LN 6.1 FP3 - DB: 10g R2 - OS: Linux SLES 10 64 Bit
Permissions

Looks like wrong permissions.

Even root has no access to your file, i assume it is roots crontab?

Please give r and x rights to others rwx r-x r-x permission and try it.

Hope it helps.

Regards,

Kozure
Reply With Quote
  #15  
Old 18th January 2007, 09:12
Roeland Roeland is offline
Junior Member
 
Join Date: Dec 2006
Posts: 29
Roeland is on a distinguished road
Baan: IV SP28 - DB: SQL Server 2008 - OS: Windows 2008
The scripts works fine.
I made a TEST job and let it run every hour from cron. This was running just fine all night.

But yesterday a job failed with the same settings.
Code:
/baan/bse/etc/rc.startjob.root FIN /tmp/job.fin 2>&1

produced the following output:

Connecting with bshell...
Connection established.
Wed Jan 17 18:55:03 CET 2007
I just didn't start. (called from cron at 18:55)
Nothing more in the logs.

I have to do some more testing...
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 job next execution date/time during time change chadwickh Tools Administration & Installation 1 15th September 2006 20:27
Start Date of Scenario tirawan Manufacturing & Supply Chain 1 3rd May 2005 16:46
Problems with relative date in Job Mgmt j. streun Tools Administration & Installation 0 30th September 2004 21:00
Measuring Original MRP Start Date on SFC order Bryan Manufacturing & Supply Chain 3 3rd September 2004 13:48
Actual Start Date in Planning Sri_baan Project & Services 0 3rd April 2002 10:21


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


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