Return The Name of the Currently Running Macro?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Return The Name of the Currently Running Macro?

Post by ueberyak » Tue Sep 03, 2013 9:51 pm

Can this be done? We have 30+ jobs which run daily and I want to add an email notification when they fail. I'd like to just slap the same blob of code in all of the jobs but if I can't systematically pull the name of the current job then I'll have to do a bit more work.
Thanks,
Josh

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Sep 03, 2013 9:57 pm

There is a Macro Scheduler variable named "script_file" that contains the name of the currently running macro.

ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Post by ueberyak » Tue Sep 03, 2013 10:11 pm

PERFECT! Much obliged.
Thanks,
Josh

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