Showing results for 
Show  only  | Search instead for 
Did you mean: 
Champion Sweeper
Hallo sweepers,

I have a several deployments that i want to combine.

1) Send active domain users a messagebox that the Dynamics AX servers will be restarted over 10 minutes and that the clients will be killed over 8 minutes. (vbs)

2) Send messagebox that AX client will be killed on client computers (vbs)(killprocess)

3) Clear AX cache on client computers (vbs)

4) Stop / Start AX object server services (command)

5) Send messagebox that the clients can login to AX (vbs)

Is it possible to set waittimes between steps ?

Deployment 1:
-Run step 1
-Wait 8 minutes
-Run step 2
-Run step 3
-Wait 2 minutes
-Run step 4
-Run step 5

Kind regards,
Lansweeper Alumni
You could add a sleep or timeout step between your steps. I've attached a screenshot of a sample step. 15 = wait for 15 seconds.

View solution in original post

Champion Sweeper
We have a couple of L O N G, very very long, deployment packages that behave much better with a "pause" step added between some of the components that are not very proper or polite in their installation processes.

To add the pause we just plug in a powershell script as a Command after the troublemakers-
Powershell.exe "start-sleep -s 90"

Lansweeper Alumni
Lansweeper will wait for one step to be completed with a success or failure message before starting the next, as you indicated as well. There is no way to tell the deployment module to proceed with step 2 after X number of minutes, regardless of whether or not step 1 was completed. Perhaps you could write your own script that runs multiple steps asynchronously, but this is not something we can provide instructions for. In addition, and as mentioned in previous posts as well, the deployment module doesn't start a deployment on all of your machines at the same time anyway. It runs the deployment in batches of X number of machines, depending on your deployment threads.
Champion Sweeper
I think you misunderstood me.
I want that the deployment is independant, so whether it runs on the machines or not, the deployment sends the next step after 8 min.
So if i hit deploy now at 12:00 then i want the next step to run exactly at 12:08.


Step 1: Run script
Step 2: Wait 8 min
Step 3: Run script
Step 4: Wait 2 min.
Step 5: Run script

The steps are now depending on status (success / fail) to run the next step.
Think like you send a message to whole company with cmd msg *, it shows the message on all computers at the same time.
Or think like a stopwatch running the deployment, when you push the deployment the stopwatch begins, after 8 min. it runs the next step and after 10 min it runs the last step.
Lansweeper Alumni
There's no built-in functionality in Lansweeper to synchronize deployments in the way you're describing. A deployment runs independently on each machine. Once a deployment is pushed to a client machine, in the form of a scheduled task, it doesn't communicate with the Lansweeper server or with other machines to check the status of those machines' deployments, even if all machines are running the same deployment package. If several machines receive the same deployment package at the same time (according to your deployment thread settings), their deployments should finish more or less at the same time. There's no built-in functionality to force synchronization though.

I've added your feature request to our customer wish list, but I'm not sure whether this will be implemented, just because I can't recall this being requested before. I'm assuming a change like this would require some major modifications of our deployment code as well. It may be possible to force synchronization within your steps/scripts themselves, but this is not something we can provide instructions or support for. I'm assuming you could write something that prints the deployment progress to a shared file somewhere and that decides whether or not to proceed with the next step based on how many machines have reported back.
Champion Sweeper
My issue is:

IF there is any problem with our CRM software and it needs a restart we normally send a mail to all users that the services will be restarted.
By default we send the mail 10 minutes before we restart the services and tell them to exit the software.
If they are still connected then the cache file will be corrupt and the software won't work correctly.

I want to do this with the deployment solution.
I have the following scripts:

1. Send message to users that the servers will be restarted over 10 min. and the clients will be killed over 8 minutes.

2. Send reminder that the services will be restarted, after clicking OK the client will be killed and the cache file will be deleted

3. Restart services on 3 servers.

4. Send message after restart services

So what i want is:

1. Send message to all active computers
2. Wait 8 minutes
3. Send reminder to all active computers and kill client + clear cache
4. Wait 2 minutes
5. Restart services on servers
6. Send message that they are restarted

So if i deploy it to all active computers, it needs to run on all at the same time.

Lansweeper Alumni
I'm not sure I'm understanding the question/issue. The step I recommended you implement has absolutely no impact on when the deployment will start, if you're running the deployment on multiple machines at once. How quickly a deployment finishes on multiple machines depends entirely on your deployment threads. These can be configured under Configuration\Server Options and determine how many deployments are started at once. If your deployment threads are set to 5 for instance, the deployment will start at the same time on 5 machines.

The step I mentioned in my previous post adds a timeout within a single machine's deployment. It doesn't influence when your machines' deployments are started.
Lansweeper Alumni
You could add a sleep or timeout step between your steps. I've attached a screenshot of a sample step. 15 = wait for 15 seconds.
Champion Sweeper
Susan.A wrote:
You could add a sleep or timeout step between your steps. I've attached a screenshot of a sample step. 15 = wait for 15 seconds.

This is only for 1 client, i want it deployment based.
The solution you gave me is like:

If it's 12:00

Client 1 runs the script @ 12:00
Client 2 runs the script @ 12:02 etc.

So client 1 will be finished @ 12:10 but client 2 doesn't ..

I want a solution whether the client runs it or not, the deployment must be finished over 10 minutes.