Hi - We have some workflows which we want to run from Alteryx Designer using Task Scheduler on Windows 10. Can it be possible?
Note: We cannot place them on the Alteryx Server as our Organization does not have capabilities to connect server from SQL Server Database. Our Workflow is connected with SQL database from Alteryx Designer server which we want to automate using Scheduler on Window 10. Is there any guidance or alternate way or advise or used case. Thank you in advance.
Here is an ace @phottovy discussing how to create a python script within a bat script to execute in scheduler. Tagging them as they'll be able to answer more questions than me, but the post is amazing and pretty thorough!
Please mark this as solved to help others if this answers your question and have a great day!
pasted from the post (all credit to phottovy):
Step 1: Download and add CReW Macros to your version of Alteryx. Then setup the "List Runner" macro to run the workflows you are hoping to schedule.
Step 2: Create a simple python script that will open and run your workflow containing the "List Runner" macro. I use the pyautogui library to start the workflow by simulating pressing "Ctrl + r". Here is the script that I created which I called "Run_Alteryx_Workflow.py":
import pyautogui as pg
import os
import time
time.sleep(10)
os.startfile('Scheduler.yxmd')
time.sleep(60) #build in enough time for Alteryx to open the workflow
pg.hotkey('ctrl', 'r')
time.sleep(10)
Step 3: Create a batch script to run your python script. Here is my version called "Run_Alteryx_Workflow.bat". This file should be saved in the same folder as your python script:
"python" "Run_Alteryx_Python.py"
Step 4: Schedule your batch script to run in Task Scheduler.
There are definitely issues with this process though. I don't have admin rights on my work computer so my computer needed to be awake to run this process. I'm sure there are many ways to improve this process but this is one I tried a few years ago.