0 votes

I have a custom command that runs a powershell script that works just fine but it takes a long time to run. When I run it on the server as just the powershell script it works, but takes about 6.5 minutes to run. When I run it through the web interface it always seems to timeout and I eventually get an error page. I'm assuming the error page is because the script takes so long to run that the browser eventually times out. Is there anyway to prevent this from happening?

Thanks!

by (520 points)

1 Answer

0 votes
by (18.0k points)

Hello,

You can configure your Custom Command to execute the PowerShell script asynchronously:

  1. Right-click your 'Run script' action and select Edit Action in the context menu.
  2. Enable the Execute asynchronously option for the action.
  3. Save the changes.
0

That worked quite well. Thank you.

0

Have you done exactly the same as given in screen shots ? Does it working now ?

0

Hello Harry,

Have you encountered any issues when implementing the above solution? Did you get any errors?

If you have some questions, issues or errors, please describe them in more detail.

0

I also have a script that takes a while to run. I have tried running it asynchronously but Adaxes still times out after 10 minutes and then the script never completes. Is there any way to increase the time that Adaxes waits for the process to finish?

0

Hello Stuart,

The thing is currently in Adaxes we have a limitation of 10 minutes, during which a PowerShell script should complete. If a script fails to complete within 10 minutes, the operation is cancelled. Currently there is no setting or configuration entry that you can use to increase the time limit.

It is quite strange that a PowerShell script cannot complete in 10 minutes. 10 minutes in more than enough for a PowerShell to complete. Probably, the best way to resolve this issue would be to optimize the script. Can you describe what the script does or send the script to our support email (adaxes@softerra.com)?

Related questions

0 votes
1 answer

We have a series of transforms we use for users including moving to different OU's. Is there a way to open the user's object after the command completes much in the same way a user creation does?

asked 1 day ago by msheppard (470 points)
0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked 1 day ago by msheppard (470 points)
0 votes
1 answer

Is it possible during a custom command to prompt input from the user initiating the command and to take a different action depending on their answer? For example, ... provide the automatic reply text If No - proceed with predetermined reply text. Thanks

asked Oct 28 by msheppard (470 points)
0 votes
1 answer

I have a few reports that I want to add to a custom command workflow such that the report is executed and exported to a csv in a pre-defined (variable) path. I was ... a script to run the report and export it, but could not locate information on that process.

asked Oct 28 by aweight (60 points)
0 votes
1 answer

I have a scheduled task that runs a custom command that itself has multiple custom commands that run in a specific timed order. I would like the scheduler to run that top level ... , but Command B and C will wait for Command A to finish. Is this possible?

asked Jul 23 by DA-symplr (100 points)
3,548 questions
3,239 answers
8,232 comments
547,814 users