Automate System Manager Workflows

So you have created and tested your brand new System Manager workflow and are thinking.. now what? I mean obviously running a workflow manually for testing purposes is fine but for production, you are probably expecting there to be a special System Manager scheduler where you can now schedule this workflow to run automatically. Right? Wrong.

System Manager is a great tool but unfortunately there is no built in scheduler. However, luckily we have our trusty Windows Task Scheduler to help us schedule our new workflow. The process is pretty straight forward. Let’s say we have created a System Manager workflow named “My_Workflow.smw” in the folder C:\Workflows. The steps to automate this workflow are as follows:

  1. First, we will create a batch file that will call the command to execute the workflow. On the same machine as the workflow, open a text editor like notepad and add the following text: MASysMgr.exe -w C:\Workflows\My_Workflow.smw “UserName=Administrator” “Password=”
  2. Be sure to replace the workflow path and username/password with your appropriate values. Save the file as “My_Workflow.bat” or another name of your choosing. The file should look similar to below. basic-task-bat
  3. Go to Control Panel->Administrative Tools->Task Scheduler
  4. Click “Create Basic Task…” from the menu on the right. basic-task-create
  5. Give the task a name and click next. basic-task-1
  6. Choose the frequency. For this example I will choose Daily.basic-task-2
  7. Enter the task start time. I will enter 9:00AM. basic-task-3
  8. Choose the option “Start a program”. basic-task-start-pgm
  9. Browse to the batch file we created in the first step. Also, I will usually populate the optional “Start in” text box with the same directory that my batch file is located. See my example below. My batch file is in the G:\temp folder so I enter that in the “Start in (optional)” field. basic-task-browse
  10. Click next and then Finish. You should now see your new schedule appear in the list of scheduled tasks. basic-task-done

That’s it! Your new workflow will now run every day at 9:00AM!

Please leave comments below!

Advertisements

Published by

BI/SQL Trix by James

I'm a BI Manager with a heavy SQL and programming background. I work with many BI, database and developer technologies including MicroStrategy, C#/ASP .NET, Python, Java, VBScript, Teradata & SQL Server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s