niralibaan
26th March 2010, 12:06
Hi,
Pls tell me How to schedule task on server to run "Generate Pegging Relation" session(cprrp0240m000)?

Regards,
nirali

mmurphy2650
26th March 2010, 18:21
Hi,
Pls tell me How to schedule task on server to run "Generate Pegging Relation" session(cprrp0240m000)?

Regards,
nirali

If you want to use Windows Scheduler on your server to schedule the job, try this:

1. Create a new LN Job (ttaad5500m000) called PEGGING and tick the Use External Schedule check box.

2. Add your Generate Pegging Relation session to the Job.

3. On the server create a Startjob.bat that looks like this:

@echo on
@setlocal

@if "%1" == "" goto argerror
@if "%BSE%" == "" goto argbseerror

@if NOT "%1" == "" set BSH_JOB=%1
@if NOT "%2" == "" set BSH_JOBOK="%2"
@if NOT "%3" == "" set BSH_FRSES="%3"

%BSE%\bin\ntbshell.exe -server ttaad5203m000
@goto end

:argerror
@echo Usage: startjob name-of-job-to-start [jobfile-OK] [From-session-number]
@goto error

:argbseerror
@echo Error: environment variable BSE not set. Set BSE variable before executing this script.
@goto error

:error
@REM generate error on OS level
@dir /fake > nul 2>&1
@goto end

:end
@endlocal

4. Create a Pegging.bat that looks like this:

call startjob.bat Pegging

5. Use the Windows Scheduler to schedule Pegging.bat

niralibaan
27th March 2010, 06:37
Hi,
Thanks for your reply.
I have created one job called 'Pegging' but not able to add session into it.
I have opened 'Sessions by Job' (ttaad5501m000) session to add sessions into my job, but new button is coming disabled into that session.
So I am not getting able to add sessions into my job.
I have also tried it from my super user login (bcoz of rights issue) but it is coming in disable mode.So not able to add sessions into it.
Pls help.
I also want to know if I create job as periodical then will my session run every day at particular time or i have to create schedular task for the same?If it is possible to autorun directly from erp at particular interval, then i don't want to make it as external.
Pls reply.

Regards,
nirali

mmurphy2650
27th March 2010, 14:19
Hi,
Thanks for your reply.
I have created one job called 'Pegging' but not able to add session into it.
I have opened 'Sessions by Job' (ttaad5501m000) session to add sessions into my job, but new button is coming disabled into that session.
So I am not getting able to add sessions into my job.
I have also tried it from my super user login (bcoz of rights issue) but it is coming in disable mode.So not able to add sessions into it.
Pls help.
I also want to know if I create job as periodical then will my session run every day at particular time or i have to create schedular task for the same?If it is possible to autorun directly from erp at particular interval, then i don't want to make it as external.
Pls reply.

Regards,
nirali

Hi Nirali,

The proper way to add sessions to a LN Job is to select the Add to Job... button in the session itself. Then you can select the Job to add the session to.

I would recommend that you go with an external Job Scheduler such as the Windows Scheduler ... the LN scheduler is not very flexible or reliable.

Mike

niralibaan
29th March 2010, 06:24
can u pls tell me how can I run session through Windows Scheduler?there isn't any 'Add to Job' button coming in session through which i can add it in to LN job..

Pls help me out.

Regards,
nirali

mmurphy2650
29th March 2010, 15:15
can u pls tell me how can I run session through Windows Scheduler?there isn't any 'Add to Job' button coming in session through which i can add it in to LN job..

Pls help me out.

Regards,
nirali

Nirali,

Does your Generate Pegging Relation session have an Add to Job button as in the attached document?

Mike