I have been using SQL Server 2016's SQL Server Agent with bottom setting and script for last 3+ years. It was/is working fine.

[![enter image description here][1]][1]

But, now, I am migrating everything to SQL Server 2019, but the same command does not work.

So, I am wondering if there is anything that I have to modify (in terms of script) because I am using SQL Server 2019.

When I run the ps1 manually file itself, it works.

When I use SQL Server Agent to run **other** Powershell script (which executes something within Powershell), it works, too.

But, when I use **SQL Server Agent** to run the Powershell script to execute **Python** file, it does not work.

Bottom is details of Powershell script:
[![enter image description here][2]][2]

I also made sure everyone has a full control over the folders that are related.

**How to we grant SQL Server Agent Service Account privileges to run Python script?**

Or is there a better way to execute a Python file directly from SQL Server Agent?

**Update (8/13/2024):**

I tried with this approach (running python directly), but still it would not do anything:
[![enter image description here][3]][3]


  [1]: https://i.sstatic.net/19psyCj3.png
  [2]: https://i.sstatic.net/QSUHPrPn.png
  [3]: https://i.sstatic.net/F65rdNVo.png