Subscribe Bookmark RSS Feed

How to run/stop JSL scripts with Task Scheduler cleanly?

jason_paquette

Community Trekker

Joined:

Jan 26, 2015

Hello,

I have automated some extraction/analysis/export tasks of mine with a few JSL scripts and I have been trying to make use of Task Scheduler to run them on a fixed schedule.

I figured it would be easy enough, so I put the following into Task Scheduler. The script itself only takes about 10 seconds to run.

It doesn't seem to matter whether or not I put "//!" at the top of the script, it runs either way.

Program/script:

C:\...\jmp.exe

Add arguments (optional):

"C:\...\myScript.jsl"

It works when I ran the task manually but I can't seem to get it to stop, meaning that subsequent runs never end up running because the first is in a permanent state of:

"The task is currently running (0x41301)".

I tried making a simple batch file to do the same thing to run in Task Scheduler, but it arrives at the same result.

Batch File:

START "" C:\...\jmp.exe "C:\...\myScript.jsl"

Wondering if anyone has had any success with automating JSL scripts and has any pointers?

Thanks,

JP

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Just add the appropriate exit command at the end of your batch and jsl script.

batch it's simply 'exit' and jsl it's 'exit();'

2 REPLIES
Solution

Just add the appropriate exit command at the end of your batch and jsl script.

batch it's simply 'exit' and jsl it's 'exit();'

Craige_Hales

Staff

Joined:

Mar 21, 2013

The scripting index example for quit() is one of my favorites.  Save your work first.

Craige