You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
TimeControl (ThingSpeak) stopped running
8 views (last 30 days)
Show older comments
I have a TimeControl to trigger Matlab Analysis that fetches some external data to write to my ThingSpeak channels. It has been working just fine, until around May 6 2023 11:30AM UTC when it stopped working all of a sudden.
I could see in my Matlab Analysis that it Timed out. I fixed the issue in the Analysis. It ran just fine (manually). But when I set it up to be triggered from the TimeControl, it didn't work, even if I changed the frequency or made it a one-time thing. I even removed the TimeControl and made a new one but still nothing works. The Last Ran field remains empty even after the supposed trigger time.
Can someone please look into this issue? Thank you very much in advance.
8 Comments
Perky Whale
on 7 May 2023
Same thing has happened to all my time controls, as of around 11:20 UTC. I'm surprised more people aren't raising this issue.
Time controls have just stopped running.
Ahmed bin Ali
on 7 May 2023
Same with me
Pablo Rodriguez
on 8 May 2023
Same problem here, last TimeControl at May 6 2023 11:26 AM UTC.
Perky Whale
on 8 May 2023
Edited: Perky Whale
on 8 May 2023
Looks like it's up and running again as of about half an hour ago. 🤙
Vince Nguyen
on 8 May 2023
Cool, thanks! Waiting for an official explanation for why this happened
Accepted Answer
Christopher Stapels
on 8 May 2023
TimeControls are working fine as of May 8 12:45 UTC. If you continue to see missing TimeControls, please comment here.
25 Comments
Vince Nguyen
on 9 May 2023
Do you know what happened and if it might happen again in the future? Thanks!
Christopher Stapels
on 9 May 2023
Over more than 6 years of using ThingSpeak, this is the first time I have experienced a timeControl not running when planned. We have addressed the issue and expect TimeControls to continue to be as reliable as they have been in the past.
Perky Whale
on 21 Jun 2023
So it turns out this hasn't been fully fixed, at least for me. I have a time control running a matlab analysis every 10 minutes, it often doesn't run up to 4 or 5 times in a row. There are no errors in the analysis, it's the time control just not running.
Christopher Stapels
on 21 Jun 2023
Thanks for the update. Can you share what your analysis code does so we can verify that part? I will check the logs to see if there is any indication.
Perky Whale
on 22 Jun 2023
It reads JSON data from a public weather station, parses some stuff and updates a thingspeak channel. Whenever the time control fails, I can run the analysis manually with no issues. The time control also shows the last time it ran, which can show 50 minutes ago despite it being a 10 minute frequency. The analysis never shows any error.
Christopher Stapels
on 22 Jun 2023
Is there any other process that updates the same channel?
We arent seeing extra records of any failed TimeControls right now.
Perky Whale
on 22 Jun 2023
This is what I'm seeing currently for the time control. There's nothing else updating the channel.
Recurrence Last Ran Run At
Every 10 minutes 2023-06-23 1:43 am 2023-06-23 2:12 am
Christopher Stapels
on 22 Jun 2023
Could you comment out the weather API part and just have it write a static value to the channel for a few cycles? Just to see if it is more consistant.
You dont have fuzzy timing set on the TimeControl do you?
Perky Whale
on 22 Jun 2023
I don't have the option for fuzzy timing for 10 minute intervals, only 15 and up I think.
I just successfully manually ran the matlab analysis 3 times in the couple of minutes before the time control was due to trigger, no problems with the code and it ran fine. The time control failed to run the analysis at 02:52 when it was due. It now says last ran 01:43, run at 03:02.
I could write static values to be sure but it does look like the time control just isn't running the analysis.
Perky Whale
on 22 Jun 2023
I should add that I've previously deleted this time control and created another to do the same thing but it didn't fix it.
Christopher Stapels
on 22 Jun 2023
Thats good that you tried a new timeControl and tested the code seperately. Can you try the static write only experiment when you get a chance?
Perky Whale
on 22 Jun 2023
I changed the time zone from local (Wellington NZ) to UTC and it hasn't skipped a beat since. A bug in the timezone coding maybe? That would explain why there are no alerts for a time control failing to run if it's not being prompted to run. Just a guess :)
Christopher Stapels
on 26 Jun 2023
Neat, thanks for the troubleshooting! Ill try out that time zone with my account and see.
Vince Nguyen
on 9 Aug 2023
Hello, TimeControl stopped working again for me. The last time it ran for me was 2023-08-09 6:46 AM GMT. It was working just fine these days but stopped again all of a sudden.
Christopher Stapels
on 9 Aug 2023
Thanks @Vince Nguyen. I see some missing TimeControls for my account as well. Ill report it to the appropriate authorities and post here if we get more news.
Christopher Stapels
on 9 Aug 2023
Service went down last night, should be restarted within an hour.
Christopher Stapels
on 9 Aug 2023
TimeControls running at 11:11 EST this morning
Vince Nguyen
on 9 Aug 2023
It's working again now, thanks a lot for your help
chris weedon
on 16 Oct 2023
I'm having a similar problem. I run the time control on my data once every 24 hours at 11pm (GMT) it appears to work for a few days then stops.
Christopher Stapels
on 16 Oct 2023
The issue we had back in May with TimControls has been corrected. Mine are definitely running fine now, and since then. If your time control is stopping, it may be due to MATLAB code that is not able to run correctly. If your code has an error, eventually ThingSpeak will stop the TimeControl execution. If your code has a sporadic error, perhaps you arent seeing it at set up time. You could consider recording the output to a channel to see if it rac correctly, ot put try catch loops in your code to make sure it completes even if there is a code failure.
chris weedon
on 16 Oct 2023
If I run it manually it works fine without showing any errors. The code itself reads my weather station data and calculates the Min, Max and Average temperatures and outputs it to another channel.
I am not sure how to add catch loops in the code
Christopher Stapels
on 16 Oct 2023
We should probably start a new thread for this.But Ill put a quick example here. If you get stuck, please start a new post. If you wanted to catch an error for example with the thingSpeakRead command, you could use the following.
Since you dont have acess to the code when its triggered by timeControl, in the catch part at the bottom, you could replace
disp(ME.message)
with something like
thingSpeakWrite(channelId, ME.message,, 'WriteKey', writeKey);
that way the error message would get recorded to a channel.
try
thingSpeakRead(channelID, data, 'WriteKey', writeKey);
catch ME
disp(ME.message);
end
I recently had an error form reading data and calculating the mean because in some instances, I didnt realize there wasnt any data to read and the code was failing. You might try wrapping the calculaiton part of your code in a try catch loop. It wont make the calculation fail, but it will make it so the code continues running even when it hits the error.
chris weedon
on 18 Oct 2023
thanks it seems to be working, I'll keep an eye on it
More Answers (0)
Communities
More Answers in the ThingSpeak Community
See Also
Categories
Find more on Read Data from Channel in Help Center and File Exchange
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)