cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar

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

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
msharp
Super User (Alumni)

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

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();'

View solution in original post

2 REPLIES 2
msharp
Super User (Alumni)

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

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
Super User

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

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

Craige