<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472530#M71727</link>
    <description>&lt;P&gt;Add&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Exit(No save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Quit(No save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to end of the jsl script you try to run to close the JMP instance&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 08:58:39 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-03-24T08:58:39Z</dc:date>
    <item>
      <title>How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471452#M71597</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to run batch file&amp;nbsp;automatically every day when &lt;SPAN&gt;radio button -"run whether user is logged on or not"&amp;nbsp; is selected&amp;nbsp;&lt;/SPAN&gt;and it doesn't work.&lt;BR /&gt;It works only when&amp;nbsp;&lt;SPAN&gt;radio button &lt;/SPAN&gt;"run with the user logged on"&amp;nbsp;&lt;SPAN&gt;is selected.&lt;BR /&gt;&lt;/SPAN&gt;Can you advise please?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:13:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471452#M71597</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2023-06-09T18:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471600#M71617</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13542"&gt;@Botzal&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you have a separate system batch file that can open a JSL file -- i.e. double click it, then you should be able to run the JSL file automatically. If the very first like of your JSL code is the following //! then once you save and close the file, if you double click it, then it runs the JSL code, but doesn't open the file for editing. If your batch file can open it, I believe it should work, but I have not tried that myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 12:25:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471600#M71617</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2022-03-21T12:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471604#M71618</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12549"&gt;@SDF1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I know and understand your explanation, but that's not what I mean.&lt;BR /&gt;My intention was,&lt;BR /&gt;How I schedule the script (Using the task scheduler) that will run every morning even when I sign out of computer.&lt;BR /&gt;The JMP script should not work interactively.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 12:54:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471604#M71618</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-21T12:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471996#M71653</link>
      <description>&lt;P&gt;What does happen when you try to manually start the task with 'run whether user is logged on or not' checked.&amp;nbsp; Does it show an error?&amp;nbsp; Does JMP start and then close (you would need to watch the task manager as the window will not open)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I sometimes need to uncheck &lt;EM&gt;everything&lt;/EM&gt; on the conditions tab to fix some errors that looked like permissions issues.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 13:31:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/471996#M71653</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-03-22T13:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472215#M71681</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6657"&gt;@ih&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When I try to run it manually it opens a CMD and JMP&amp;nbsp;process&amp;nbsp;(in task manager) and it's stuck on running status.&lt;/P&gt;&lt;P&gt;In addition, I tried to uncheck everything in condition tab, it is still didn't work.&lt;BR /&gt;Do you have any other advice please?&lt;BR /&gt;Thx&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Botzal_0-1648026878463.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41048iDF35F38DA802B5A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Botzal_0-1648026878463.png" alt="Botzal_0-1648026878463.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Botzal_1-1648026917168.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41049i4A68C46888C3A138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Botzal_1-1648026917168.png" alt="Botzal_1-1648026917168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 09:19:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472215#M71681</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-23T09:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472243#M71684</link>
      <description>&lt;P&gt;Since JMP did start I would focus on your script.&amp;nbsp; Perhaps start with something very simple like what is below.&amp;nbsp; Remember all of your outputs need to be written to a file, you will not have access to any windows or reports opened by your script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run this interactively first and make sure you have access to write to the file, then delete the csv file and try running it through the task scheduler:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//!

dt = New Table( "Untitled",
	Add Rows( 1 ),
	New Column( "test", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1] ) )
);

dt &amp;lt;&amp;lt; Save As( "C:/test.csv" )
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2022 12:08:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472243#M71684</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-03-23T12:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472529#M71726</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6657"&gt;@ih&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do this, it does not work&lt;BR /&gt;&lt;SPAN&gt;It also opens a CMD and JMP&amp;nbsp;process&amp;nbsp;(in task manager) and it's stuck on running status.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:55:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472529#M71726</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-24T07:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472530#M71727</link>
      <description>&lt;P&gt;Add&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Exit(No save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Quit(No save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to end of the jsl script you try to run to close the JMP instance&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 08:58:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472530#M71727</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-24T08:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472531#M71728</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;of course, I added to the script... doesn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 09:14:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472531#M71728</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-24T09:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472576#M71730</link>
      <description>&lt;P&gt;To clarify, when you say it does not work, does that mean the file IS created when the task is set to run when the user is logged on and you manually start the task, and it is NOT created when set to run whether the user is logged in or not and you manually start the task?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 11:44:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472576#M71730</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-03-24T11:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472621#M71731</link>
      <description>&lt;P&gt;Correct.&lt;BR /&gt;The script run and generates output when &lt;SPAN&gt;the "Run only when user is logged on" is selected,&lt;BR /&gt;and it is does&amp;nbsp;not work when the "Run whether&amp;nbsp;user is logged in or not" is selected.&lt;BR /&gt;In both options I start the task manually.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 13:23:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/472621#M71731</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-24T13:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474409#M71914</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6657"&gt;@ih&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I was able to run the above &lt;SPAN&gt;simple&amp;nbsp;&lt;/SPAN&gt;script automatically when the button "Run whether the user is logged on or not"&amp;nbsp; was selected.&lt;BR /&gt;The solution to run it - I added /k in Task Scheduler - see below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Botzal_0-1648626125094.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41301i35C27EBA1DFDDCAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Botzal_0-1648626125094.png" alt="Botzal_0-1648626125094.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;But when I try to run a complicated script (pulling data from the server and saving output on the server) It still does not work - It stuck on running status . any advise please?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 08:25:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474409#M71914</guid>
      <dc:creator>Botzal</dc:creator>
      <dc:date>2022-03-30T08:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474646#M71942</link>
      <description>&lt;P&gt;You might add some actions in your script help point you to the parts of your script that do not work. For example, you could add lines like this throughout your script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Save Text File( "$TEMP/RunStatus - Finished defining functions.txt", "")
Save Text File( "$TEMP/RunStatus - Starting to download data.txt", "")
Save Text File( "$TEMP/RunStatus - Downloading data and starting transformations.txt", "")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:58:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474646#M71942</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-03-30T18:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a script automatically  - Task scheduler cannot run batch file (run whether user is logged on or not)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474714#M71946</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13542"&gt;@Botzal&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm not sure what you are trying to do with both cmd &amp;amp; jmp file running at the same time.&lt;/P&gt;&lt;P&gt;I able to run my script during user log out/in at specific time will below flow;&lt;/P&gt;&lt;P&gt;-&amp;gt; Task scheduler run my JSL script run at specific time&lt;/P&gt;&lt;P&gt;-&amp;gt; the .jmp script open a cmd file (for IT to do some copy/paste JMP Results from local PC to intranet server)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//call IT cmd to copy the files to intranet server
RP = run program(
	Executable ("C:\ScriptJMPAutomation\MoveJMPFile.exe")
);
//set no save for auto taskscheduler
exit(nosave);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;-&amp;gt; .cmd file close after running its script &amp;amp; .jmp file exit with no save.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The task scheduler .jmp will still show running unlimited time if I click it to manual run through Task Scheduler.&lt;/P&gt;&lt;P&gt;So I forced it to stop after 1 hour through the task scheduler setting.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WebDesignesCrow_0-1648705981521.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41346iFB7182929F8CE987/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WebDesignesCrow_0-1648705981521.png" alt="WebDesignesCrow_0-1648705981521.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can check back the results after the "1 hour" done. It will show as "ready".&lt;/P&gt;&lt;P&gt;My report ready to view the next morning even though the PC is log-off during the script running.&lt;/P&gt;&lt;P&gt;I'm not sure if this is helpful but just to share how I did it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you can also read below link for details.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docplayer.net/48888365-Syntax-overview-let-s-start-with-the-syntax-of-run-program.html" target="_blank"&gt;https://docplayer.net/48888365-Syntax-overview-let-s-start-with-the-syntax-of-run-program.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 05:58:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-run-a-script-automatically-Task-scheduler-cannot-run/m-p/474714#M71946</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2022-03-31T05:58:38Z</dc:date>
    </item>
  </channel>
</rss>

