SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Want to create/start job immediately from JDL

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Want to create/start job immediately from JDL
Author Message
Bill Richardson



Joined: 06 Dec 2002
Posts: 8

Post Want to create/start job immediately from JDL Reply with quote

Using the JDL information in Chapter 17 of the manual,
I am attempting to create a new job in the scheduler that
runs only once and starts immediatley.

How do I do this?

For example,
ADD NAME=MY_NEW_JOB

COMMAND=NOTEPAD

SCHEDULE_TYPE=O

START_TIME=00:00

START_DATE=04/09/03

SKIP=N
SAV

This job gets created but not scheduled (SCHEDULE_TYPE=O).
If I use SCHEDULE_TYPE=D, the job is scheduled for
00:00 on 4/10/03.

Also, using a SET, can I get an existing job to
execute one time?

Wed Apr 09, 2003 4:35 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: Want to create/start job immediately from JDL Reply with quote

After you add the job using ADD command try SET MY_NEW_JOB SCHEDULE_TYPE=O as in example below

ADD ...
...
SAVE
SET MY_NEW_JOB SCHEDULE_TYPE=O
SET MY_NEW_JOB START_TIME=02:00

: Using the JDL information in Chapter 17 of the manual,
: I am attempting to create a new job in the scheduler that
: runs only once and starts immediatley.

: How do I do this?

: For example,
: ADD NAME=MY_NEW_JOB

: COMMAND=NOTEPAD

: SCHEDULE_TYPE=O

: START_TIME=00:00

: START_DATE=04/09/03

: SKIP=N
: SAV

: This job gets created but not scheduled (SCHEDULE_TYPE=O).
: If I use SCHEDULE_TYPE=D, the job is scheduled for
: 00:00 on 4/10/03.

: Also, using a SET, can I get an existing job to
: execute one time?

Wed Apr 09, 2003 5:32 pm View user's profile Send private message
Bill Richardson



Joined: 06 Dec 2002
Posts: 8

Post Re: Want to create/start job immediately from JDL Reply with quote

Unfortuneately this doesn't work.

1. All jobs added with "ADD" are created with a name
of "New Job" regardless of what I set the name to in
the command. This looks like a bug.
2. With SET statements, I always get an error
when referring to any job by name. I can only use
job numbers.
3. Even when I set a job (by number) to have a new
START_TIME, the job does not start if that time has
passed. This is true even if the SKIP property is
set to N. This also looks like a bug.

Any ideas?

: After you add the job using ADD command try SET MY_NEW_JOB SCHEDULE_TYPE=O as
: in example below

: ADD ...
: ...
: SAVE
: SET MY_NEW_JOB SCHEDULE_TYPE=O
: SET MY_NEW_JOB START_TIME=02:00

Thu Apr 10, 2003 6:47 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: Want to create/start job immediately from JDL Reply with quote

It does not provide any overflow protection; it simply keeps incrementing the last used number by one every time a new job is created. As a result of that if you hit the top limit for 32-integer value (positive range) the next number will be a negative number which will most likely "logically" damage the job database. If you wish you can provide such protection yourself. If you plan to create/delete jobs dynamically put some IF logic to your script in order to reset the last used number to some usable and yet valid value. The last used number is stored in the registry. You can check the value from your script before creating a new job.

: Unfortuneately this doesn't work.

: 1. All jobs added with "ADD" are created with a name
: of "New Job" regardless of what I set the name to in
: the command. This looks like a bug.
: 2. With SET statements, I always get an error
: when referring to any job by name. I can only use
: job numbers.
: 3. Even when I set a job (by number) to have a new
: START_TIME, the job does not start if that time has
: passed. This is true even if the SKIP property is
: set to N. This also looks like a bug.

: Any ideas?

Thu Apr 10, 2003 11:52 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: Want to create/start job immediately from JDL Reply with quote

Please disregard my next message which was posted by mistake.

Can you post your script here?
I noticed that you have ADD and NAME on the same line, is this correct?

Also do not forget to call SAVE at the end, If SAVE is not called job changes do not get submited to the active job pool.

: Unfortuneately this doesn't work.

: 1. All jobs added with "ADD" are created with a name
: of "New Job" regardless of what I set the name to in
: the command. This looks like a bug.
: 2. With SET statements, I always get an error
: when referring to any job by name. I can only use
: job numbers.
: 3. Even when I set a job (by number) to have a new
: START_TIME, the job does not start if that time has
: passed. This is true even if the SKIP property is
: set to N. This also looks like a bug.

: Any ideas?

Thu Apr 10, 2003 11:59 am View user's profile Send private message
Bill Richardson



Joined: 06 Dec 2002
Posts: 8

Post Re: Want to create/start job immediately from JDL Reply with quote

Okay--putting the ADD on its own line solved the
problem of the job names all being "New Job".

I still can't get a SET command to work with
anything except a job number.

SET MY_NEW_JOB SCHEDULE_TYPE=O
SET MY_NEW_JOB START_TIME=02:00
SAV

When I execute this, I get an error "Error:4 - DDE request denied, invalid property name or job cannot be found"

: Using the JDL information in Chapter 17 of the manual,
: I am attempting to create a new job in the scheduler that
: runs only once and starts immediatley.

: How do I do this?

: For example,
: ADD NAME=MY_NEW_JOB

: COMMAND=NOTEPAD

: SCHEDULE_TYPE=O

: START_TIME=00:00

: START_DATE=04/09/03

: SKIP=N
: SAV

: This job gets created but not scheduled (SCHEDULE_TYPE=O).
: If I use SCHEDULE_TYPE=D, the job is scheduled for
: 00:00 on 4/10/03.

: Also, using a SET, can I get an existing job to
: execute one time?

Thu Apr 10, 2003 1:05 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: Want to create/start job immediately from JDL Reply with quote

Hm... This part of your script looks fine to me. I will try it here and let you know what I get

: Okay--putting the ADD on its own line solved the
: problem of the job names all being "New Job".

: I still can't get a SET command to work with
: anything except a job number.

: SET MY_NEW_JOB SCHEDULE_TYPE=O
: SET MY_NEW_JOB START_TIME=02:00
: SAV

: When I execute this, I get an error "Error:4 - DDE request denied,
: invalid property name or job cannot be found"

Thu Apr 10, 2003 2:29 pm View user's profile Send private message
Brent



Joined: 20 Feb 2002
Posts: 57

Post Re: Want to create/start job immediately from JDL Reply with quote

In the trace window, when a set command is called with a job name instead of a number, the JDL is attempting to locate job "0". I get a message that says: JDL Remote Send: job "0" not found. Bill and I need to know the syntax of setting the properties of a job using its name and not its number.

: Okay--putting the ADD on its own line solved the
: problem of the job names all being "New Job".

: I still can't get a SET command to work with
: anything except a job number.

: SET MY_NEW_JOB SCHEDULE_TYPE=O
: SET MY_NEW_JOB START_TIME=02:00
: SAV

: When I execute this, I get an error "Error:4 - DDE request denied,
: invalid property name or job cannot be found"

Thu Apr 10, 2003 5:24 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7968

Post Re: Want to create/start job immediately from JDL Reply with quote

Sorry, it appears that you cannot use job names with the SET command, only job IDs can be used in that place.

I was playing with different options and could not reproduce your original problem. It appears that your script works just fine for me. Please try it one more time

ADD
   NAME=MY_NEW_JOB
   COMMAND=NOTEPAD
   SCHEDULE_TYPE=O
   START_TIME=02:45
   START_DATE=04/09/03
   SKIP=N
SAVE

: Okay--putting the ADD on its own line solved the
: problem of the job names all being "New Job".

: I still can't get a SET command to work with
: anything except a job number.

: SET MY_NEW_JOB SCHEDULE_TYPE=O
: SET MY_NEW_JOB START_TIME=02:00
: SAV

: When I execute this, I get an error "Error:4 - DDE request denied,
: invalid property name or job cannot be found"

Thu Apr 10, 2003 10:56 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.