Forums

How to write a command for tasks?

How am I supposed to make a task? My script runs and spends about 4 seconds and then it seems to cancel and nothing happens.

I believe the issue is in the command. But I've tried everything:

/home/myUsername/myFile.py

With Python3.10 before and without. With other versions. I tried every possible file path. I changed the file name to not have any spaces. It still never works, it simply eats up some of the seconds (about 4) and there's no console running.

I was able to succesfully get the script running if I go to files, open it and run it. All good there. So the issue with the command.

Do you see any errors in the log of the task? If not, maybe the task ran, but it just didn't give any output? You can add more logging to see what the task is actually doing. Also, good way to test the command is to copy it and run it in a fresh Bash console -- if that works, it should work in the task, too.