Can't run my schedule task


I try to run a task but it doesn't seem to work. I get:

It always says "2018-05-11 23:22:11 -- Completed task, took 5.00 seconds, return code was 0." but nothing happens. The python file print multiple things so I thought I was going to see something? Is it a memory problem? How can I get more info about the error?

/home/swdating/.virtualenvs/myvirtualenv/bin/activate /home/swdating/swdating_code/scripts/

Thank you :)

That return code means that your task did run. Do your prints rely on there being some sort of list of things to work on? If so, check that the list has what you think it should have and trace the problem back from there.

Yes but at the beginning of the script, I have a simple:

print("We start !")

but it doesn't show anything inside the logs. Same sentence:

"2018-05-12 16:24:12 -- Completed task, took 5.00 seconds, return code was 0". It's a bit strange that the script duration is always 5 seconds.

Then make sure that the code you're running is the code you think you're running. You could also try simplifying your code down and then slowly adding things back in to identify what might be causing the issue.


So I've added a second task with a python script (/home/swdating/.virtualenvs/myvirtualenv/bin/activate /home/swdating/swdating_code/scripts/ that only contains:

print("Python test is OK")

When I check the logs for that python script, I have:

"2018-05-14 09:34:14 -- Completed task, took 7.00 seconds, return code was 0."

And I don't see my print + 7 seconds for a print is strange?

Thanks in advance.

Damn! I just noticed the problem that's obvious in the first post. You are using the virtualenv incorrectly. Make the task command:

/home/swdating/.virtualenvs/myvirtualenv/bin/python /home/swdating/swdating_code/scripts/

instead of

/home/swdating/.virtualenvs/myvirtualenv/bin/activate /home/swdating/swdating_code/scripts/

Sorry it took me so long to spot that.

Thank you :)