Frequently Asked Questions

Why does my Operation run from the Start menu or Operation Preview but not when it is Scheduled?

The are various situations that can cause the Operation to not run when Scheduled through the Executive Server even though when tested through the Preview Operation or Windows Start menu Run capability it does run. Here are some things to check:

Make sure the SmartBatch Service is using a Windows Account (that is, User ID) that has access to the resources required by the Operation. You may need to change the Service (under Control Panel, Administrative Tools, Services) so that it logs on under a specific id. Refer to the section in online help titled Service Environment and Security.

The Start Menu and Preview Operation capabilities run the Operation on the local computer. The Executive Server runs the Operation on the computer it is running on.  Make sure the environment is set up correctly where the Executive Server runs.

Make sure the Executive Server is running.  You can determine this by looking at the Task Manager on the computer where the Executive Server should be running.  Under processes look for the es.exe entry. Also, when attempting to connect to the Executive Server from the Administrator, you should be able to successfully connect.

How do I access network files?

When initially configured, SmartBatch is installed as a service under the System Account logon. System Account, by default, does not have access to network resources, including files. If you need to access network files, the SmartBatch Service can be changed to run under a specific account that has access to the necessary resources. Also, services do not automatically map drives since they provide a batch logon rather than an interactive logon. Even if you are logged on interactively, services do not have access to interactively mapped drives. The best approach to this is to use the universal naming convention (UNC naming) when accessing network files. For example, to copy a file from system NY to SF the Operation would be configured as:

cmd.exe /c copy \\NY\Ddrive\MyData\Important.Dat, \\SF\GDrive\Import\Important.Dat

Note: DDrive and GDrive are shares that have been created on \\NY and \\SF.

For more information refer to SmartBatch online help topics: About Services and Service Environment and Security.

How do I know the status of an Operation or Job that I have scheduled to run today?

The Status window has an entry for each Operation, Step and Job that is scheduled to run for the current day. When the day changes (that is, the clock goes past midnight), the Status display will then include the items for the new day. Any items from the previous day will continue to be displayed until they have completed or have been deleted.

How can I find out if something ran successfully?

When you configure Operations, you can specify to write History information for the Operation on Start, Success or Failure. By doing so, the Executive Server will insert entries into the SmartBatch History or Windows Event Log.  Display the History list by clicking on the History node in the tree view.  Optionally select the filtering criteria and click on the List button to redisplay the History.

What happens when our server goes down and objects were being processed by the SmartBatch Executive Server?

When the Executive Server starts processing, it determines if there was anything running when it went down or if anything should have run while it was down.  It may place these objects in a Pending status depending on the objects Schedule configuration options (see Schedule Properties). You can view Pending objects by displaying the Status window.  You must then choose to delete the object from the Status or Resume the object.  The object will remain in the Status display with a Pending Status until you choose to delete or resume it.

How can I resume an object that is in the Pending status on the Status window?

Select the object that you want to resume by right-clicking on the line and then selecting the Resume menu item. If the object is a Job, you will be prompted to enter the Step and Operation the Executive Server should start with. By default, the Executive Server will start with the first Step and first Operation in the Job. If the object is a Step, you will be prompted to enter the first Operation to start with.  By default the first Operation is selected.

How can I execute an object when I just want to run it now?

You list the object by selecting an Operations, Steps or Jobs node in the tree view.  The configured Operations, Steps or Jobs are then listed in the list in the right pane of the Administrator.  Select the object you want to run by right-clicking on it in the list and selecting Execute menu item. The object will of course run again when it is scheduled.

How can I change the time an object will run?

On the Schedule Properties window you can change the time of a Schedule. You do this by changing the time and selecting the Apply or Ok button. If an object is already listed in the Status list (remember the Status list shows the object to be run on the current day), the time of the object will be changed if it has not already started processing.

How does SmartBatch know if something ran successfully?

When you configure Operations, you can an specify Exit expression and Keyword expression for the Executive Server to check. Exit Code values are used by many programs to indicate if they ran successfully. Keyword values is a feature unique to SmartBatch.  It gives you the ability to specify an application log file you want the Executive Server to examine using the configured Keyword expression.  When the Operation completes the Executive Server looks at the Exit Code values and Keyword values that you have configured.  The Executive Server does a regular expressions match on the exit code or keyword expression comparing to the exit code or application log file produced by the Operation.  If it is determine that an error has occurred, the processing of errors and notification proceeds based on the configuration.

Why would I want to use Steps or Jobs as opposed to just using Operations?

Operations are used to configure any program that you want to run. You must use Operations, but Steps and Jobs are optional.  You may have several Operations that need to run in sequence, when the first is completed the second one should be run and so on. You can place any number of Operations in a Step and any number of Steps in a Job so that the objects are run in sequence. You schedule just the Step or Job so that the configuration is more manageable. Steps and Jobs add more flexibility to the configuration by allowing Operations to be added to Steps and Steps to Jobs.

How do I know once I have set up an Operation it will run correctly?

From the Operation Update window you can navigate to the Preview Operation window by pressing the Preview button. From the Preview window you can select the Parameter List to apply to the Operation (if Parameters are being used) and then run the Operation. This runs the Operation on the local computer. If the Operation is setup correctly, it will run.

How can I schedule a .bat (a DOS batch file) in SmartBatch?

The Operation in this case is CMD.EXE the Windows command interpreter.  For example, to run the batch file test.bat and then terminate the CMD program when it is done processing the file, the Operation would be:

CMD.EXE /c c:\mybats\test.bat

The /c tells the CMD program to exit after processing the test.bat file. For help on CMD, type CMD /? at a command prompt.  

You can also enter the .bat file in the Operation directly as simply:

c:\mybats]\test.bat

I received an error 2 or error 5 when I ran the Operation. What does that mean?

You might see one of these error codes in the SmartBatch History, Status Window or error message returned from Preview Operation. This occurs when the path\filename for the executable or script file is wrong or contains spaces.

Error 5 is returned if the path or filename contains spaces and the path\filename is not enclosed in quotes. You need to enclose it with quotes (e.g., "c:\program files\myprogs\myprogram.exe").

How do I start or stop a Windows Service in SmartBatch?

To start a service:

The Operation will be CMD.EXE /C NET START servicename.

To stop a service:

The Operation will be CMD.EXE /C NET START servicename.

You can get more help on the NET command by typing NET /? at the command prompt, NET START /? or NET STOP /?. Also, you may want to refer to your Windows documentation for detailed information.

Note:  If there service you want to stop has dependent services you will need to stop the dependent services first.

How do I make an Operation dependent on another Operation?

When you add Operations to a Step, the Operations are processed in the order listed on the Step Properties window.

How do I make an Step dependent on another Step?

When you add Steps to a Job, the Steps are processed in the order listed on the Job Properties window.

How do I make a Job dependent on another Job?

The Dependency Properties window allows you to specify a dependency of one Job on another (Job to Job dependency type).

How do I know what the Executive Server is doing?

The Status window in the Administrator shows what the Executive Server has in its queue to process for the current day.  The Executive Server also keeps a detailed log file in a subfolder where SmartBatch is installed.  The subfolder is called Executive.  So, for example, you will find the logs in c:\Program Files\SmartBatch\Executive.

Why don’t I see an object listed on the Status window that I have scheduled to run today?

If you are not seeing something in the Status window that you expect to run today check the following items:

Make sure the object and its schedule are Enabled. There are Enabled checkboxes on all Properties windows (e.g., Operation Properties, Schedule Properties).

Make sure that the Next run date indicates that the object is to run on the current day.

Make sure that the Executive Server is running.

Make sure that when you connect to the SmartBatch Administrator you select the same correct computer the Executive Server is running on.

Check the History (if you are having your Operations write to the History) to see if the object has already run. When it completes, it is no longer shows on the Status window.

How can I configure a program to run after the data it depends on is available?

This is a typical situation where you may want to import data into a database but you need to wait for the data to arrive. For example, say you know that the data arrives at about 2:00AM, but sometimes it may be late. To handle this situation, you setup an Operation for the program you use to import the data (for SQL Server this might be the Bulk Copy Program or Data Transformation Services). You then add the Operation to a Step and optionally, add the Step to a Job. You can place a dependency on an Operation, Step or Job using the Dependency Properties window. You identify the Operation, Step or Job that has the dependency and then configure the file it is dependent on. The dependency can be on the file timestamp or just the existence of the file by looking for an EOF > 0. Add the dependency by clicking the Apply or OK button. Configure the Schedule for the Operation, Step or Job to run at 2:00AM. Once the file dependency is satisfied the Executive Server will run the object.

How do I know what the Notification Server is doing?

The Notification Status window shows a detail activity log of what its doing. This is useful when you are originally setting up notification to see if any problems  are occurring due to the configuration or when you just want to see what’s currently happening.

Note:  This window will not be displayed if the SmartBatch service is configured in noninteractive/silent mode.

How can I determine why the Notification Server does not seem to be sending out the Notifications?

Check the following items:

Make sure that the Operators on the Alert List are Enabled. There is an Enabled checkbox on Manager Operators window.

Make sure that the Operators on the Alert List are available (the times you configured on the Manage Operator window) at the time of day you are trying to notify them.

Make sure that the Email and Paging information for the Operator is correct.

Make sure that the Notification Server is running.

How do I specify the text I want sent with a Notification?

On the Operation Properties window the Notification tab allows you to specify text for each Operation for the Start, Success or Failure conditions. Make sure an Alert List has been assigned to the Operation.

How can I provide instructions to SmartBatch administrators about our automation processing?

SmartBatch has a Runbook capability that allows you to assign instructions/documentation to any object. For example, if you wanted to add instructions about a specific Operation you would list the Operation on the Operation List window, select it and press the Runbook button or right-click on the object and select the Runbook menu item.. You can then enter the necessary instructions.

How can I schedule an object to run all day?

SmartBatch has a scheduling option on the Schedule Properties window (recurring tab) that allows you to run an object starting at 12:00 AM and end at 11:59 PM recurring every n minutes. You don’t specify the start and end times; you simply select the option Run all day and indicate the Every n Minutes value. Under this option, if the Executive Server is shutdown and then started, objects with this schedule configuration will automatically start processing. This is different from other schedule options that place objects in a Pending status if the Executive Server determines they should have been run when the Executive Server was down.