• Support
  • Articles
  • Resources
  • Products

Macro on a background scheduled task

Moderator: boris

12 postsPage 1 of 1

bibio
Newbie

Posts:
4
Joined: Wed May 04, 2016 2:20 pm
by bibio » Wed May 04, 2016 2:28 pm
Hi everyone,

I want to schedule a macro that makes a Telnet connection to a remote server.

When that scheduled task is run when the Windows session is on, that works perfectly.

But when the task is run from a session that isn't open. The macro doesn't work.

It seems that ttpmacro needs a graphical environment to work.

Is there a way to make the ttpmacro process work background?

Have a nice day!

Bibio
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 04, 2016 2:49 pm
Please provide more details - which scheduler you use and how you configure it.
Thanks.
Best regards,
Boris
bibio
Newbie

Posts:
4
Joined: Wed May 04, 2016 2:20 pm
by bibio » Wed May 04, 2016 3:04 pm
Hello sir,


I use the Windows task scheduler on win server 2003.

I created a simple batch file that looks like that: "ttpmacro file.ttl" (ofc with the good paths)

The task is run with an user that isn't connected.
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 04, 2016 4:21 pm
I'd try Macro command hiding Tera Term window. Add showtt 0 to the beginning of your macro and see if that helps.

Tera Term design team: Could you please advise if Tera Term Macro can be started by scheduler service without a user being logged in? If not, would it be possible to look into possibility of adding this as a new feature?
Thanks.
Best regards,
Boris
Yutaka Hirata
TeraTerm Developer

Posts:
609
Joined: Wed Jan 12, 2005 2:35 pm
by Yutaka Hirata » Thu May 05, 2016 2:39 pm
Hi everyone,

As it turns out, Tera Term macro can be worked by task scheduler without a user
being logged in. Please use '/I' option as command line.

For your information, please refer below ticket#31877 for details. Sorry for Japanese only.
https://osdn.jp/ticket/browse.php?group ... &tid=31877
Best regards, Yutaka Hirata
(yutakakn at gmail.com)
http://hp.vector.co.jp/authors/VA013320/
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Thu May 05, 2016 3:11 pm
Thanks Yutaka!

Command Line description currently describes /I as "Iconify Tera Term window": http://ttssh2.osdn.jp/manual/en/command ... aterm.html
It would be good to mention that this mode can also be used with scheduler, when user is not logged in.
Thanks.
Best regards,
Boris
Yutaka Hirata
TeraTerm Developer

Posts:
609
Joined: Wed Jan 12, 2005 2:35 pm
by Yutaka Hirata » Thu May 05, 2016 4:05 pm
Hi Boris,

Thank you for your feedback.
I have been updated the document in the following:

http://ttssh2.osdn.jp/manual/en/command ... aterm.html

Please confirm my changing content whether it is right or not.
Best regards, Yutaka Hirata
(yutakakn at gmail.com)
http://hp.vector.co.jp/authors/VA013320/
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Thu May 05, 2016 4:10 pm
Thanks! It looks good now.
Thanks.
Best regards,
Boris
bibio
Newbie

Posts:
4
Joined: Wed May 04, 2016 2:20 pm
by bibio » Thu May 05, 2016 10:40 pm
Hello,

I'm going to try this out as soon as I can.

Many thanks for your job.

Bibio
bibio
Newbie

Posts:
4
Joined: Wed May 04, 2016 2:20 pm
by bibio » Mon May 09, 2016 6:52 am
It works like a charm, thank you!

I put a startup macro pro ttermpro and I run ttermpro with only /I as argument.


By the way, I'm running the 3.1 version of teraterm and in the "ttpmacro.txt" file, where is explained the way to use ttpmacro, there is a this line:

TTPMACRO.EXE [/I] [/V] [<macro file> [<second param>] [<third param>]]

Correct me if I'm wrong but the behavior of teraterm doesn't change whether you put or not /I or /V. According to me, those arguments only matter for ttermpro.exe but I may be wrong.


Anyway thank you again!
andrelhj
Newbie

Posts:
1
Joined: Tue Feb 06, 2018 4:56 pm
by andrelhj » Tue Feb 06, 2018 5:11 pm
Hello guys,
I'm trying to run a macro in the background but I can not by any means. Running the macro manually with runttl, ttpmacro, logmett, and ttermpro works correctly, however, when I try to run the macro remotely with the scheduled task, psexec, powershell, etc ... does not work. I've already tried putting in .bat too and it does not work. I use Windows 7 and the latest version of Tera Term. I have already done all the above tips but it was not.
Someone with some suggestion !!!
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Tue Feb 06, 2018 11:43 pm
Neither TeraTerm, nor LogMeTT were designed to run as a service, so you won't be able to use just these tools to run your script when nobody is logged into the computer.

As for windows built in scheduler you may try using TeraTerm with '/I' switch mentioned earlier it this thread.
Check also this topic on Microsoft TechNet.
Thanks.
Best regards,
Boris
Display posts from previous:
Sort by:

12 postsPage 1 of 1

Users browsing this forum: No registered users
cron