Scheduled Tasks log with virtual env return code 126


I'm trying to read logs that include print statements, etc. from a scheduled task that's a Django command with a virtual env.

When I look at the logs, they just read:

bash: /home/ardtiernan/.virtualenvs/MyVirtualEnv: Is a directory

2018-11-08 07:01:03 -- Completed task, took 4.00 seconds, return code was 126.

My scheduled task command is:

/home/ardtiernan/.virtualenvs/MyVirtualEnv /home/ardtiernan/wardroh/ parser --store 'default' --location 'default' --downloadfile 'default'

The return code of 126 indicates that the code isn't executable, right? Can I get more information from a log to help me fix the problem?


It's already telling you what the issue is "/home/ardtiernan/.virtualenvs/MyVirtualEnv: Is a directory" - you can't execute a directory. You probably want to use "/home/ardtiernan/.virtualenvs/MyVirtualEnv/bin/python" instead.

Yep... that'd be it... Thanks Glenn