Passing variable from PHP to Macroscheduler possible?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Pzr
Newbie
Posts: 3
Joined: Mon Jun 22, 2009 9:01 am

Passing variable from PHP to Macroscheduler possible?

Post by Pzr » Thu Jan 20, 2011 9:07 am

As Subject, Is this possible to do?
I have searched the forum and not been able to find this out.

(But where thinking somehow in the execution line of the macro...?)

/Emanuel
nothing beats cubic inches.

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jan 20, 2011 9:22 am

Yes, it is possible. See "Command Line Options" in the help file:

msched.exe macroname_or_script_file /Var1=value1 /Var2=value2

Works the same for compiled macros:

macro.exe /Var1=Value1 /Var2=value2

This may also interest you:
http://www.mjtnet.com/blog/2010/01/29/r ... b-via-php/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Pzr
Newbie
Posts: 3
Joined: Mon Jun 22, 2009 9:01 am

Post by Pzr » Thu Jan 20, 2011 11:48 am

Thanks! 8)

Will try like this: exec('query.exe /session_id='.$session_id.' /hostname='.$hostname.' /user='.$user.'');

Your'e doing a Ggggreat job!

*BUMP*

Hmm. Seems i only get one of the variables to the exe.
and I cant figure out how to make this work with three.
nothing beats cubic inches.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts