Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Alteryx Server Shutdown OneDrive and Restart Using Run Command

aehrenwo
11 - Bolide

We have an extensive workflow that runs on the Altteryx Server which generates and updates a lot of new files. It seems that every week when this job executes it crashes OneDrive on our AWS EC2. We use OneDrive as a critical piece to sync the new files back to SharePoint. If OneDrive crashes and doesn't start back up my colleagues don't see the changes synced to the cloud. 

 

I have tried several options. A Task Scheduler to temporarily shut down OneDrive and restart it. This never seems to execute properly and OneDrive inevitably crashes anyway.  Also tried a 3rd party app "AlwaysUp" that supposedly is supposed to keep tasks from crashing but it too doesn't stop the dread error from popping up from OneDrive. 

 

I attempted to use the Events function on either end of the other workflow in question but it just hangs and never completes. 

 

Finally, I thought maybe I had figured out a solution using the Run Command in Altteryx to run the specified executable file and shutdown command and then restart using another Run command. I put a Wait a Second in between to have it wait the 30 min or so until the other workflow is done running. Seet attached workflow. The first Run Command tool successfully closes OneDrive but it never finishes, and I don't see a way to set a timeout. 

 

Any suggestions? I am trying to avoid having to come into AWS and restart OneDrive manually every Thursday morning. 

 

 

3 REPLIES 3
DiganP
Alteryx Alumni (Retired)

@aehrenwo Use the .bat script I attached. Change the code ENTER_USER_HERE to your username.

 

 

cd "C:\users\ENTER_USER_HERE\AppData\Local\Microsoft\OneDrive"
OneDrive.exe /restart /exit
timeout 5
exit 0

 

 Image of configuration:

 

Onedrive config.PNG

Digan
Alteryx
aehrenwo
11 - Bolide

When I run it locally on the AWS it works fine. 

 

However, when I published it to server it just hangs and does not reset OneDrive. Any thoughts? 

taxguy33
8 - Asteroid

@aehrenwo  Did you ever find a solution to this? We are running into the same issue over the weekends, it just stops syncing the OneDrive files/folders and we require our IT Admin to login as the service account, which auto-starts the OneDrive sync process again and within a few minutes is fine. Tried to automate this via the Run Command tool, but could never get the RunCommand tool to stop working / exit.