Page 1
Page 1
Started By
Message

Windows script gurus..help! Need to trigger a script based on incoming email

Posted on 9/21/17 at 1:24 pm
Posted by CAD703X
Liberty Island
Member since Jul 2008
78081 posts
Posted on 9/21/17 at 1:24 pm
Ok, real quick.

We use a product called "beyond compare" that scans and syncs files between a staging and production server.

Using it manually has gotten out-of-hand because our department has grown and we have 100s of thousands of files that could need to be compared.

I set up "Task Scheduler" on my machine which has access to production and built a few "Beyond Compare" scripts for some key comparsions that run automatically every night.

With me so far? So far so good.

******************

Problem - Several folks need my assistance to sync/update sub-directories in more of an ad-hoc fashion, not on a nightly schedule.

I, being lazy, don't want to have to field each of these requests..it cuts into my TD posting time so i'd like to set up a series of 'canned scripts' that execute based on receiving an email with certain keywords.

So, I have 90% of the process figured out, what I am lacking is the best way to trigger the application scripts (which are already written).

Anyone familiar with writing a script to accomplish this within Outlook? What are the exact steps to create this within Outlook? I see that I have to use something called "Outlook Visual Basic for Applications" which I don't think came with Office but I have a MSDN membership so I can probably download that.


However, I'm consulting with the brain trust on here before I do that in case there's a much easier way.

In short:
- email arrives on my desktop with subject line "replication request: partner a"
- outlook rule sees that and opens the Beyond Compare EXE and passes the correct Beyond Compare script to it as a parameter to execute.

I exported the "task Scheduler" script I'm using but its a huge a XML document that I think is specific to that process.

Am I going about this the wrong way?
This post was edited on 9/21/17 at 1:27 pm
Posted by BoogaBear
Member since Jul 2013
5566 posts
Posted on 9/21/17 at 1:34 pm to
I would create a simple web application.

Have them click a button that triggers the job instead of forcing Outlook to do something it isn't designed for.
Posted by CAD703X
Liberty Island
Member since Jul 2008
78081 posts
Posted on 9/21/17 at 2:34 pm to
quote:

I would create a simple web application.

Have them click a button that triggers the job instead of forcing Outlook to do something it isn't designed for.


the problem is this all has to funnel through my PC which has VPN access to the location in question.

i'm not running any type of IIS on my computer.
Posted by BoogaBear
Member since Jul 2013
5566 posts
Posted on 9/21/17 at 3:45 pm to
Linux VM with Tomcat and a Java page?


I'm just not a big fan of forcing things to do things they weren't designed to do. A little more time and thought and you can create something not half baked.

Maybe a trigger file? Have them drop a request file on a shared drive and have a process that trolls the drive every minute for new requests?
Posted by chryso
Baton Rouge
Member since Jul 2008
11867 posts
Posted on 9/22/17 at 8:01 am to
How about if the web application creates a file with a certain name in a specific location on a share drive? On your desktop you can run a scheduled task every 5 minutes to check for the file(s). If the file exists then you kick off the .exe and delete the file thus priming it for the next run.
Posted by XanderCrews
Member since Mar 2009
774 posts
Posted on 9/22/17 at 1:09 pm to
(no message)
This post was edited on 12/21/21 at 11:20 am
Posted by foshizzle
Washington DC metro
Member since Mar 2008
40599 posts
Posted on 9/23/17 at 7:43 am to
quote:

Am I going about this the wrong way?


Probably.

If people need this service performed so often, you should have an IT guy set this up on a server for people to trigger. It should not be going through your own machine at all.
first pageprev pagePage 1 of 1Next pagelast page
refresh

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on Twitter, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookTwitterInstagram