Last active
September 27, 2024 10:08
-
-
Save damc-dev/eb5e1aef001eef78c0f4 to your computer and use it in GitHub Desktop.
Execute Bash Script (Using Git Bash) from Windows Task Scheduler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd /c ""C:\Program Files (x86)\Git\bin\bash.exe" --login -i -- H:\Daily_Reports\yesterdayTogglReport.sh" |
In windows 10 task scheduler action configuration this can also be done by
Action: Start a program Program/script:
"C:\Program Files\Git\bin\bash.exe"
(or whatever your bash.exe location is) Add Arguments:--login -i -- H:\Daily_Reports\yesterdayTogglReport.sh
Hi tried, but the action result stucked 'in esecution'
I tried via CMD and It works properly.
Any suggestion?
Same problem here. Did you discover a solution?
@ryansherby I bypass the cmd and call it the .sh file directly instead.
It worked I had a problem and in Start In I had to puth the path of the .sh file
Thank you a lot
thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are a number of options.
I just duplicated my key and removed the passphrase for batch jobs (insecure depending on where/how you store your key files, but solves this particular problem). This may violate your company's requirement, so don't do this when you've been required to have a passphrase; use this second option.
Another option is in this: https://stackoverflow.com/questions/21095054/ssh-key-still-asking-for-password-and-passphrase (You're looking for the ssh-add/ssh-agent info). Also look here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases