Written by

Question sansa stark · Aug 24, 2017

Automatic Run process

Hi All, I want to run the routine automatically when the system gets login.How to do that?

Comments

Dmitry Maslennikov  Aug 28, 2017 to sansa stark

Could you please share content of this Routine?

0
Tom Fitzgibbon · Aug 24, 2017

Need more information (with examples) on what you're trying to do.

If you're talking about:

1) a user login on Cache, you can start a routine/method on login for a terminal type service. http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCAS_users

2) Cache startup and other events you can run routine/method. http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSTU_customize_startstop

3) many other variations

Tom Fitzgibbon | 9179331226 | gototomAtG...l

0
sansa stark  Aug 28, 2017 to Dmitry Maslennikov

Sure,

%ZSTART
	S ^TRACE="ZSTART"
	S Path="C:\VARATHA\TestCreate.txt"
	O Path:"WNS":2
	E  U 0 W "File Not Open",!
	U Path W "TEST",!
	C Path
	Q 
0
Dmitry Maslennikov  Aug 28, 2017 to sansa stark

You should read the article in documentation more carefully. You should use some labels, in your case you missed SYSTEM

In this case, it should work properly

%ZSTART
SYSTEM
    S ^TRACE="ZSTART"
    S Path="C:\VARATHA\TestCreate.txt"
    O Path:"WNS":2
    E  U 0 W "File Not Open",!
    U Path W "TEST",!
    C Path
    Q 
0
sansa stark  Aug 28, 2017 to Dmitry Maslennikov

But I tried to write the Code in ZSTU routine its work fine.

0
sansa stark · Aug 28, 2017

Hi Dmitry and Tom, I have created a new routine in %sys namespace named it as %ZSTART simply set one Global in that routine but when i restart the system it wont be set.Can you please help me am struggling in last two days to proceed further

0