Forums

Scheduled Tasks Not Running

I have scheduled tasks that I want to run daily, but I cannot get them to run. I have tried removing and adding the tasks to no avail. I have tried adding several iterations of daily tasks at staggered intervals and I have tried hourly scheduling. I have also tried waiting a couple hours for the scheduled tasks in case it needs to sync or something. None of this has had any impact.

The primary symptom is that the task log just says "Task has not been run yet". One of my tasks should have an impact on a file and the file has not been updated so I am confident the task is actually not running and not just failing to log. I have confirmed that the task runs correctly when manually run from the console. My primary task needs to run in Python 3.x and I confirmed that I have the proper hashbang. I have also created a dummy task that runs from the console fine to make sure it wasn't an issue with my script or the folder itself.

After doing all the troubleshooting I can think to do it just appears that my tasks are not running when scheduled. I searched the forums prior to this and the closest thing to my issue is, I think, this: https://www.pythonanywhere.com/forums/topic/1435/

Please let me know if there are any trouble shooting steps I may have missed or if there is any other information I can provide to diagnose the issue.

I am also having the same problem. They were running before but now they aren't.

Hi there, it looks like the task server had built up a backlog over the last few days. We've cleared the backlog, and we'll keep a closer eye on it... Let us know if things seem to be back to normal?

Hi Harry,

Thanks for your follow up. Everything seems to be working fine for me.

:)

Did the scheduled tasks stop running after midnight 2015.10.20 ?

Looks like our attempt to fix the tasks is not as effective as we'd hoped. It does seem to be helping, just not completely eliminating the issue. We're going to tighten it up a bit and see what the results are.

it's 2019 and I'm having the same problem

nice

@wiseybot What is the command you are trying to run?

Hi Team,

Even I am not able to run the below command on scheduled tasks: /usr/bin/python3.8 /home/SaurabhBrahmankar/WhatsApp_Automation/Twilio_App.py

Earlier it was working fine, but for a long not able to schedule any task.

Thanks in an advance!

Hi @SaurabhBrahmankar -- did you check your tasks logs if there are any errors? I see you have one task scheduled right now, but it is set for later today, so it hasn't run yet.

Yes, it hasn't run yet, but the task which was there till yesterday was not running at all and hence no logs.

Can we look into your files? We can do that, but we always want to ask first.

Yes, please go ahead, anything for resolving the issue.

Thanks -- the first thing I see, there are bunch of logfiles in your /var/log/ directory. One of them contains logs for a task that has been running (at least) since 2021-02-18 till 2021-03-01, which has some errors logged. Could you take a look at that?

Hi Team,

My daily tasks run normally for the most time. But recently, one of the tasks failed to run as scheduled. Which happened twice in the past month.

I've checked the log and there is no log for the missing date. Which I can assume that it didn't run at all. Last time, I did nothing to it and it run normally again the next day. But this happend again today. So I have to run it manually.

I wonder what's wrong with my task? btw, both times are the task scheduled at 00:00 failed.

Thanks

We have an issue, that we have recently identified and are working to fix where sometimes a scheduled task will not be run. The issue is most likely to affect tasks that are scheduled at busy times (on the hour, on round minutes (like 15, 30, 45 past that our)). Midnight is probably the time of day that is most likely to be badly affected by the bug.

Thanks for the reply. If possible, Please notice me when this problem has been completely fixed. I don't want to move my whole project to another server.

Will do!

EDIT Please disregard the following problem report. As soon as I reported the problem, the task started running again.

I have a scheduled task that runs every 10 minutes and has been doing so for months. Today (2022-11-17), it stopped being run some time between 18:35 and 18:45 UTC. The following task log entry shows that it completed successfully at 18:37:27, but that it took over 100 seconds to run. This task normally takes 5 to 8 seconds to run. Is there a problem with scheduled tasks today?

2022-11-17 18:37:27 -- Completed task, took 112.45 seconds, return code was 0.

My hourly task stopped running 12 hours ago. Delete the task and set it up again and it is still not running. Anyone else having this issue today?

It looks like we had some issues running tasks earlier today, but it should be resolved now. Are they running again?

Thank you, it is working now.

Glad to hear that!

@nkahr Hi, Task log tells me the last completed task was yesterday, but today it is not completing the task. Do you know of a good way I can troubleshoot why it fails, and also why the task log is not informing me? I tried rescheduling it a few times, but no info show up in the log. Best,

Hi, Tasks are not running, I put one in to run daily, and it did not run. Then I put another task to run hourly and it has not run all day. Is there something else I need to do to get the task to work?

We've added capacity to our scheduled tasks servers, so tasks should start behaving better over the next day or so.

@glenn Okay thanks :)

Same problem, scheduled tasks don't work :( Update: Fixed! :)

Fixed here too!

Glad to hear that!

I'm having this problem where my scheduled task won't run at the time I set it. :(

We need more details. Do you use UTC time?

Hi - my daily scheduled task did not run today. I was able to successfully run it manually so there is no error with the file. In the task log there is no information on what happened today. Are there any known issues with the server today?

Task did not run today. Task Log returns 404 error.

I am receiving this issue to. when i click the logs, i get a

404 Not Found The page that you seek can't be found; lost in the clouds. Please look somewhere else

« Return to PythonAnywhere home

We had an issue where a number of log files were deleted today; sorry about that! The scheduled tasks did run (with a couple of exceptions) -- it was just that the log files were not written.

hi there - I'm also having issues with scheduled tasks not running. It runs fine when I do it manually, but the app I've got just doesn't seem to be executed at the specific (or any) time.

Email us at support@pythonanywhere.com with more details about your task.

Ok thanks - email sent

We will handle it there.

Scheduled task are not running

Your task ran yesterday and is not scheduled to run until 4pm UTC tomorrow.