Issue

powerJobs Processor should be started automatically when a user logs on, the workstation restarts or on a daily intervall


Solution

If you want to automatically start powerJobs Processor you will need at least version 22.0.3. An automatic login feature was implemented in that version.


In order to actually start it the Windows Task Scheduler can be used. 


Open Task Scheduler

  • Press WIN+R
  • Run taskschd.msc


Create Folder 

If not already done create a new folder for your tasks

  • In Task Scheduler folder tree right click on folder "Task Scheduler Library"
  • Select "New Folder..." and create a folder "coolOrange"


Create a restart script

Create a new file "C:\Scripts\RestartPowerJobs2022.ps1" with the following content

if(Get-Process -Name JobProcessor -ErrorAction SilentlyContinue) {
Start-Process -FilePath "C:\Program Files\Autodesk\Vault Client 2022\Explorer\JobProcessor.exe" -ArgumentList @("/stop")
Start-Sleep -Seconds 60
}
Start-Process -FilePath "C:\Program Files\coolOrange\powerJobs Processor\powerJobs.exe"

Restart Daily


Create a new task

  • Right click on folder "coolOrange"
  • Select "Create Task..." and call it something like "restart_pjp_daily"
  • In tab "General" press "Change User or Group..." if you want to change the user that will be running powerJobs
  • In tab "General" select "Run only when user is logged on"


Set Triggers

  • In tab "Triggers" press "New..." and select "Daily" and press "OK"


Set Actions

  • In tab "Actions" press "New..."
  • Select action "Start a program"
  • In Program/Script textbox type "PowerShell.exe" without the quotes
  • In the "Add arguments (optional):" textbox type "C:\Scripts\Restart.PowerJobs.ps1" without the quotes


Restart when computer starts


Using this method powerJobs Processor will be running without GUI. If you want to see the GUI you also have to create a "Restart at logon" task


Create a new task

  • Right click on folder "coolOrange"
  • Select "Create Task..." and call it something like "run_pjp_on_startup"
  • In tab "General" press "Change User or Group..." if you want to change the user that will be running powerJobs
  • In tab "General" select "Run wether user is logged on or not"


Set Triggers

  • In tab "Triggers" press "New..." and select "Daily" and press "OK"


Set Actions

  • In tab "Actions" press "New..."
  • Select action "Start a program"
  • In Program/Script textbox type "PowerShell.exe" without the quotes
  • In the "Add arguments (optional):" textbox type "C:\Scripts\Restart.PowerJobs.ps1" without the quotes


Restart at logon


Create a new task

  • Right click on folder "coolOrange"
  • Select "Create Task..." and call it something like "run_pjp_on_logon"
  • In tab "General" press "Change User or Group..." if you want to change the user that will be running powerJobs
  • In tab "General" select "Run only when user is logged on"


Set Triggers

  • In tab "Triggers" press "New..."
  • In the "New Trigger" window in "Begin the task:" select "At log on"
  • If you want powerJobs to only start when a specific user logs in also select "Specific user:" and press "Change User...", otherwise use "Any user


Set Actions

  • In tab "Actions" press "New..."
  • Select action "Start a program"
  • In Program/Script textbox type "PowerShell.exe" without the quotes
  • In the "Add arguments (optional):" textbox type "C:\Scripts\Restart.PowerJobs.ps1" without the quotes


The option "Start on Windows Logon" in the jobProcessor "Administration" tab currently does not work with powerJobs! When enabled it starts the jobProcessor.exe


Automatically start the jobProcessor.exe

If you can not install at least powerJobs Processor 22.0.3 you can use the jobprocessor.exe instead.

You can either do this by checking the "Start on Windows Logon" setting in the "Administration" tab of the Jobprocessor window or by using a batch file during startup. Please refer to the Microsoft and Autodesk documentation for information how to automate the Jobprocessor(ADSK KB).


When using Jobprocessor.exe instead of powerJobs.exe you will lose the following powerJobs Processor features:

  • powerJobs Processor log window
  • Automatic update of configuration files. (Just start powerJobs.exe one time after adding/removing script files. The configuration changes carry over when using Jobprocessor.exe)
  • Time triggered jobs


See Also

powerJobs Processor 22.0.3 Change Logs (coolOrange wiki)

Vault 2020 Job Processor Command Line (Autodesk Help)

Use Startup, Shutdown, Logon, and Logoff Scripts (Microsoft Technet)