cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-601332%22%20slang%3D%22fr-FR%22%20mode%3D%22UPDATE%22%3Eautomatic%20script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601332%22%20slang%3D%22fr-FR%22%20mode%3D%22UPDATE%22%3E%3CP%3EHello%2C%20is%20it%20possible%20to%20create%20a%20script%20in%20JMP%20that%20launches%20automatically%20every%20n%20minutes%3F%20(JMP%2017)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-601332%22%20slang%3D%22fr-FR%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAutomation%20and%20Scripting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EQuality%20and%20Process%20Engineering%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601351%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601351%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20think%20you%20can%20build%20a%20loop%20in%20JMP%20to%20do%20so%2C%20but%20better%20would%20be%20to%20use%20the%20Operating%20System%20to%20schedule%20the%20task%20like%20possible%20in%20Windows%20etc.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Ftaskschd%2Fabout-the-task-scheduler%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAbout%20the%20Task%20Scheduler%20-%20Win32%20apps%20%7C%20Microsoft%20Learn%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601360%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601360%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9474%22%20target%3D%22_blank%22%3E%40Georg%3C%2FA%3E%26nbsp%3B%20suggested%20using%20the%20OS%20scheduler%20to%20relaunch%20JMP%20periodically.%3C%2FP%3E%0A%3CP%3EJMP%20also%20has%20a%20schedule()%20function%2C%20but%20it%20requires%20leaving%20JMP%20running.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.0%2Findex.shtml%23page%2Fjmp%2Futility-functions.shtml%23ww2805822%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.0%2Findex.shtml%23page%2Fjmp%2Futility-functions.shtml%23ww2805822%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601410%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3Egreat%2C%20thanks%2C%20was%20not%20aware%20of%2C%20that's%20the%20reason%20why%20reading%20community%20is%20quit%20helpful!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20think%20the%20solution%20depends%20on%20the%20environment%20and%20requirement%20in%20detail.%20We%20use%20task%20scheduler%20of%20operating%20system%2C%20so%20that%20for%20each%20run%20a%20new%20instance%20of%20JMP%20is%20started.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601413%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601413%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9474%22%20target%3D%22_blank%22%3E%40Georg%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EI%20think%20you%20can%20build%20a%20loop%20in%20JMP%20to%20do%20so%2C%20but%20better%20would%20be%20to%20use%20the%20Operating%20System%20to%20schedule%20the%20task%20like%20possible%20in%20Windows%20etc.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Ftaskschd%2Fabout-the-task-scheduler%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAbout%20the%20Task%20Scheduler%20-%20Win32%20apps%20%7C%20Microsoft%20Learn%3C%2FA%3E%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3CBR%20%2F%3EDon't%20forget%20to%20add%20the%20%2F%2F!%22%20to%20the%20first%20line%20if%20you%20try%20to%20run%20this%20via%20task%20scheduler%20(windows).%20This%20is%20so%20it%20will%20automatically%20run%20and%20not%20just%20open.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.0%2Findex.shtml%23page%2Fjmp%2Frun-a-script.shtml%23%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.0%2Findex.shtml%23page%2Fjmp%2Frun-a-script.shtml%23%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELine1%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F!%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601449%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601449%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIn%20my%20case%20I%20have%20not%20used%20the%20%2F%2F!%2C%20because%20I%20found%20it%20annoying%20when%20opening%20the%20script%20for%20editing%20it%20would%20have%20executed%20all%20the%20time%20(I%20often%20forgot%20...).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%20in%20Win10%20using%20Task-Scheduler%2C%20and%20adding%20JMP.exe%20as%20Program%20and%20the%20script%20path%20as%20optional%20argument%2C%20JMP%20executes%20the%20script%20in%20defined%20way%2C%20so%20%22%2F%2F!%22%20is%20not%20needed.%20Of%20course%2C%20the%20script%20needs%20to%20close%20JMP%20after%20finishing%20(%26nbsp%3BQuit()%3B%20).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-601548%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20script%20automatique%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-601548%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESee%20Help%20%26gt%3B%20Scripting%20Index.%20Then%20search%20for%20the%20Schedule()%20function.%20This%20function%20works%20entirely%20within%20JMP%20and%20does%20not%20rely%20on%20the%20OS.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
hcarr01
Level VI

script automatique

Bonjour, est-il possible de faire un script sous JMP qui se lance automatiquement toutes les n minutes ? (JMP 17)

1 ACCEPTED SOLUTION

Accepted Solutions
AApperson
Level II

Re: script automatique


@Georg wrote:

I think you can build a loop in JMP to do so, but better would be to use the Operating System to schedule the task like possible in Windows etc.

About the Task Scheduler - Win32 apps | Microsoft Learn



Don't forget to add the //!" to the first line if you try to run this via task scheduler (windows). This is so it will automatically run and not just open.

https://www.jmp.com/support/help/en/17.0/index.shtml#page/jmp/run-a-script.shtml# 

 

Line1:

 

//!

 

View solution in original post

6 REPLIES 6
Georg
Level VII

Re: script automatique

I think you can build a loop in JMP to do so, but better would be to use the Operating System to schedule the task like possible in Windows etc.

About the Task Scheduler - Win32 apps | Microsoft Learn

Georg
AApperson
Level II

Re: script automatique


@Georg wrote:

I think you can build a loop in JMP to do so, but better would be to use the Operating System to schedule the task like possible in Windows etc.

About the Task Scheduler - Win32 apps | Microsoft Learn



Don't forget to add the //!" to the first line if you try to run this via task scheduler (windows). This is so it will automatically run and not just open.

https://www.jmp.com/support/help/en/17.0/index.shtml#page/jmp/run-a-script.shtml# 

 

Line1:

 

//!

 

Georg
Level VII

Re: script automatique

In my case I have not used the //!, because I found it annoying when opening the script for editing it would have executed all the time (I often forgot ...).

 

Instead in Win10 using Task-Scheduler, and adding JMP.exe as Program and the script path as optional argument, JMP executes the script in defined way, so "//!" is not needed. Of course, the script needs to close JMP after finishing ( Quit(); ).

Georg
Craige_Hales
Super User

Re: script automatique

@Georg  suggested using the OS scheduler to relaunch JMP periodically.

JMP also has a schedule() function, but it requires leaving JMP running.

https://www.jmp.com/support/help/en/17.0/index.shtml#page/jmp/utility-functions.shtml#ww2805822

 

Craige
Georg
Level VII

Re: script automatique

great, thanks, was not aware of, that's the reason why reading community is quit helpful!

 

So I think the solution depends on the environment and requirement in detail. We use task scheduler of operating system, so that for each run a new instance of JMP is started.

 

Georg

Re: script automatique

See Help > Scripting Index. Then search for the Schedule() function. This function works entirely within JMP and does not rely on the OS.