Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.25k stars 105 forks source link

DOCS - Example Task by command #132

Open falefernando01 opened 1 year ago

falefernando01 commented 1 year ago

I tried to follow the example in the url https://rocketry.readthedocs.io/en/stable/tutorial/advanced.html to execute a task by command, but, following the example app.task('daily', command ='echo "Hello world"'), an error occurs. To work, it was necessary to include the parameter shell=True. app.task('daily', shell=True, command='echo "Hello world"')

Miksus commented 1 year ago

Hmm, ye. I think there is some room to improve the command task. Furthermore, the CommandTask does not support asyncio even though it could (there are subprocess functionalities in asyncio).

Which OS are you using perhaps? I actually think that needs shell as "echo" is not a program itself but a shell command. But not a shell/terminal expert.