Online Help | Desktop App

Scheduled Task Agent

For Alloy Navigator Express Cloud (SaaS)

Introduced in 2022.1

Updated in 2023.1

Alloy Scheduled Task Agent is a tool that executes Scheduled Tasks, non-interactive workflow items in Alloy Navigator Express that run automatically, outside of an object's context. Scheduled Tasks are used to automate various integrations and automated tasks that Alloy Navigator Express comes with, such as "Microsoft Intune integration" or "Maintenance: Delete 'x' Year Old History." This topic describes how to run Scheduled Tasks from the command line.

In on premises environments, Scheduled Tasks are typically run by the Automation Server. However, you can run Scheduled Tasks without the Automation Server, from the command line. This scenario can be useful for our cloud customers who want to run Scheduled Tasks in their local environment, without the need to grant Alloy cloud applications access to their local resources that some Scheduled Tasks may need to access.

To set up running a Scheduled Task from the command line:

  1. In your web-based Admin Center or the desktop Settings App, locate the Scheduled Task to run. You can find them under the Services > Scheduled Tasks area.

  2. Create a command for running the agent from the command line. For details, see Command-line parameters for Alloy Scheduled Task Agent.

  3. Use the Windows Task Scheduler to schedule your Scheduled Task to run automatically. See Using the Task Scheduler to automate Scheduled Tasks.

Command-line parameters for Alloy Scheduled Task Agent

The executable program that Alloy Scheduled Task Agent uses is ScheduledTasks.exe. The executable file is located in the /Bin sub-folder of your Alloy Navigator Express installation folder.

TIP: In the current version, the only way how our cloud customers can obtain ScheduledTasks.exe is to contact Support Team. However, we are planning to include that tool into the Alloy Administrative Tools package for SaaS. Stay tuned!

The following table lists all the command-line parameters for ScheduledTasks.exe. Command-line parameters are case insensitive.

Parameter Description

/?

Displays the full list of command-line parameters and a usage example.

/AccessKey="Key_Name"

The name of the Database Access Key for your Alloy Navigator Express database.

Cloud customers obtain that key with other access information. You can always view the key in your Alloy Navigator Express Settings App, in the Connection Manager window (see the Key Name field).

/RunID="Job_GUID"

The Scheduled Task's ID (GUID), a 128-bit text string enclosed in braces {}.

For example: {6EB366D9-7291-4CF4-9799-066E0D79E7B0}.

You can easily copy the job GUID from the Settings App. Navigate to your Scheduled Task (Services > Scheduled Tasks), right-click the task, and select Copy Item ID (GUID) to Clipboard from the pop-up menu.

TIP: Alternatively, you can use the Admin Center to copy the task's GUID from the browser's address bar when the task is selected. In that case, make sure to enclose the GUID in braces {}.

/Log="File_Name"

The name of the temporary log file (no extension is needed). This parameter is optional.

If the /Log="File_Name" parameter is not specified, a log file with a random file name is created.

After every successful run, the log data is uploaded to Scheduled Tasks Log and the log file is purged from the hard disk. Log files for failed jobs remain on the hard disk.

Temporary log files are created in this folder:

%ALLUSERSPROFILE%\Alloy Software\Alloy Navigator Express \Logs\Services\

For example, the following command runs the Scheduled Task with the GUID {6EB366D9-7291-4CF4-9799-066E0D79E7B0} and accesses the database using the Database Access Key SERVER_001 : DB_001. The log data will be saved to the file %ALLUSERSPROFILE%\Alloy Software\Alloy Navigator Express\Logs\Services\ScheduledTasks.log.

ScheduledTasks.exe /AccessKey="SERVER_001 : DB_001" /RunID={6EB366D9-7291-4CF4-9799-066E0D79E7B0} /Log="ScheduledTasks"

Using the Task Scheduler to automate Scheduled Tasks

You can use the Windows Task Scheduler to automate Alloy Navigator Express Scheduled Tasks. Create this task on a server computer in your network that has access to the SQL Server hosting your database and the local resources that your Scheduled Task requires access to.

NOTE: The steps below show how to create a scheduled task on a computer running Windows 10. For other Windows versions, refer to your Windows documentation.

To automate a Scheduled Task using the Task Scheduler:

  1. Open the Windows Task Scheduler. For example, type Task Scheduler in the Windows search box, and click the top result to open the Task Scheduler. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  2. You may want to place your new task to a new folder for easier identification. In that case, right-click the Task Scheduler Library branch, select the New Folder option, and create a new folder.

  3. Click the Actions menu, and then click Create Basic Task.

  4. Type a name for the task and an optional description, and then click Next.

  5. To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.

  6. Click Start a program, and then click Next.

  7. Click Browse to navigate to the executable program (ScheduledTasks.exe), specify the command-line parameters as arguments, and then click Next.

    INFO: For details, see Command-line parameters for Alloy Scheduled Task Agent.

  8. Click Finish.

IMPORTANT: The account that will run the Windows task must have sufficient rights to access the resources that your Scheduled Task needs to access. If needed, you can specify a dedicated account on the General tab of the Task Scheduler's task, by clicking Change User or Group under Security options.