-   Tools Administration & Installation (
-   -   Scheduling Jobs with windows (

lebowski 30th September 2014 15:53

Scheduling Jobs with windows

I am moving from unix to windows and want to schedule the jobs using the task scheduler and the script startjob.bat.

Problem: The job name has a blank in it, e.g. TEST JOB.
In Unix I could start the job using double quotes :$BSE/etc/rc.startjob "TEST JOB"

If I do the same in Windows, the job is not started. I also tried 'TEST JOB' or `TEST JOB`.

If I rename the job to TEST_JOB (no blank) it works, but there are quiete a few jobs with blanks and I am lazy :-)

Can you help me with the syntax ?


bhushanchanda 30th September 2014 17:21


What I did was, create a bat file to run the Jobs. And added the bat files to the Scheduler.

It works with/without spaces:-



set BSE=D:\Infor\FP7LN\bse\
set USER=baan
set BSE_COMPNR=200
D:\infor\fp7ln\bse\bin\startjob.bat REBUILD BALANCES
TASKKILL /IM cmd.exe

vinceco252 30th September 2014 17:50

I haven't tried this, but you can also change the batch file to use "~%1" instead of "%1" for the job argument and pass the argument as "TEST JOB". The "~" should remove the double quotes from the argument.


lebowski 1st October 2014 15:57

Thanks Bushan & Vince.

Unfortunately that didnt work.
Bushan's bat file works only if there is no blank in the job name and Vince's tip brings this message: JOB"" was unexpected at this time.

However, now I just copied the jobs to a new name with underscore (like TEST_JOB). I wasnt aware that all the sessions within the job are copied automatically - if I knew that before I wouldt have bothered you. I thought I have to inser all the sessions afterwards manually....

Thanks again & have a nice day.


P.S.: Maybe it is because of Windows 2012

smusba 3rd June 2015 17:12

send me ur team viewer credentials and I will help you.
call me on 966-558802943

jbaanm 10th July 2017 19:29

Any of you can suggest how the command line will be in bwc file in windows to use the %1 as user and $2 as Job?



rahul ingale 12th July 2017 19:38

@echo without space parameter %~1
put above line in test file batch.

call this file as wherever the path like
f:\test\test.bat "test job" this will give output as
without space parameter test job

replace %1 to %~1 in batch file where it is used.

the tilde sign after percentange.
this will remove quotes from parameter.

call every job like startjob.bat "test job".

cons:-make sure you call job with quotes (space or without space job name).

All times are GMT +2. The time now is 14:53.

©2001-2018 - -