'Start flask from Powershell

Does somebody have any idea how to start my flask server in the morning with Powershell?

I have a powershell function but it creates a loop :(

function flask{
    Write-Host "Starting flask"

    conda activate chk_req
    cd $codepath\projects\chk_req
    $env:FLASK_APP='run3.py'
    flask run
    Write-Host " > FINISHED"
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source