What types of errors or logs are generated. You need to make sure that the script is using the correct python interpreter.
This is what my test task looks like (Windows Server 2016):
Make sure you are running with a user that has the correct permissions (depends what you want to do).
Make sure you set the full path to the python environment that has the ArcGIS API for Python installed in my case this is "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"
Make sure you add an argument with the full path to the script you want to run. In my case this is "C:\Users\<my-username>\some_script.py". Add any other arguments your script by expect.
I would test that the task can be run manually from within the Task Scheduler. Then if that's working, add a trigger to schedule it.
Hope that helps,
Aaron