Aug 20, 2020 03:49 PM
Hello everyone! I’m having significant challenges with getting an automation to run on a schedule.
Airtable says:
" Can I set up a script to run on a schedule using Automations?
However, the time filter doesn’t seem to work very well for more frequent than daily. I was able to get ~ every minutes, but I was hoping to get something more real-time. To test the concept, I made a table where the first column is the “age” of the record using the following formula:
DATETIME_DIFF(NOW(),CREATED_TIME(),"seconds")
I then set up the automation to trigger when a record enters a view which filters all records newer than 10 seconds. The automation adds a new record to the same table. In theory, the automation should be running every 10 seconds continuously.
But, that formula only updates every 5 minutes or so. I’m not 100% certain on the time interval, but refreshing the base does not cause it to update.
Any thoughts on how to run a script more often than every 5 minutes?
p.s. This is to automate back-linking to prevent misinformation when records aren’t back-linked properly.
Solved! Go to Solution.
Aug 21, 2020 10:34 AM
I figured it out! My assumptions were wrong, so forgive me for throwing everyone off the right track.
Requirements:
My first assumption was that the automation trigger should be the record entering a view filtered by the modified time of the “Next Task” field. If the modified time was in the last minute, the automation should be triggered. However, this is foolish, because the NOW() function does not update fast enough.
In the shower last night I realized I was going about this all wrong! Below is the correct process laid out the best I can:
The Automation triggers a script developed by @openside: New Script: Same Table Linked Records Backlinks
A few modificaitons had to be made to eliminate calls to the “Output”.
Works beautifully now :grinning_face_with_big_eyes:
Aug 20, 2020 04:04 PM
It’s not the formula update that runs every 5-ish minutes. From my tests, it’s the refreshing of the NOW()
calculation. Other formulas I’ve used to trigger automations will update virtually instantly, but any time you’re comparing against NOW()
, you can’t guarantee precision.
Can you share more details? There might be a different way to solve the problem, but without knowing more about your setup, particularly how records are made/updated that would lead to missing back-links, it’s hard to know where to begin.
Aug 20, 2020 05:42 PM
If you need precise scheduling, I would just go with Integromat which has very extensive built-in scheduling, and you can repeat triggers every 1 minute on their Standard Plan.
Aug 21, 2020 10:34 AM
I figured it out! My assumptions were wrong, so forgive me for throwing everyone off the right track.
Requirements:
My first assumption was that the automation trigger should be the record entering a view filtered by the modified time of the “Next Task” field. If the modified time was in the last minute, the automation should be triggered. However, this is foolish, because the NOW() function does not update fast enough.
In the shower last night I realized I was going about this all wrong! Below is the correct process laid out the best I can:
The Automation triggers a script developed by @openside: New Script: Same Table Linked Records Backlinks
A few modificaitons had to be made to eliminate calls to the “Output”.
Works beautifully now :grinning_face_with_big_eyes: