Hi, I wrote a script which scrapes web data. But only does so if that data isn't found in a file already.
When I run it in the console manually, it immediately finds all the data and completes in just a couple seconds. However, I have this script running every hour (59 minutes past), and the task logs show that it takes thousands of seconds most of the time and is killed. It is usually killed, I imagine, because it took longer than an hour. However, at times, it will show that it took a couple hundred seconds and then is still killed.
This places my task in the tarpit after a single execution and every task is killed throughout the day.
I know my code isn't very efficient, but all I do is read a json file and check if data exists. 99% of the time, it does already exist, so the inefficient parts don't even execute.
2019-04-10 08:25:39 -- Completed task, took 5189.00 seconds, return code was 0.
2019-04-10 08:58:46 -- Completed task, took 3578.00 seconds, return code was 0.
/bin/bash: line 1: 32229 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py /bin/bash: line 1: 30565 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py /bin/bash: line 1: 28926 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py
2019-04-10 11:10:47 -- Completed task, took 7899.00 seconds, return code was 137.
2019-04-10 11:10:47 -- Completed task, took 4291.00 seconds, return code was 137.
2019-04-10 11:10:48 -- Completed task, took 693.00 seconds, return code was 137.
/bin/bash: line 1: 32506 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py
2019-04-10 12:00:51 -- Completed task, took 104.00 seconds, return code was 137.
/bin/bash: line 1: 3200 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py
2019-04-10 13:00:51 -- Completed task, took 104.00 seconds, return code was 137.
/bin/bash: line 1: 4538 Killed python /bin/run_scheduled_task.py /home/brettcomardelle93/mysite/op-bot.py
2019-04-10 14:01:05 -- Completed task, took 117.00 seconds, return code was 137.