Scheduling a module to only run once per day

The scenario is currently set to run whenever a task is modified in my Project Management system. But there is a specific module inside the scenario that I only want to run once per day.
Meaning that once it’s run once on the given day, it wont run anymore until the next day.

Is this possible to do?

Hi @Lewis_AP and welcome to the Make Community!

Off the top of my head, you could do this a number of ways. The goal is to have a datastore that knows if the process has been run or not. One way to do that is to use Make’s internal data store.

You can learn more about Data stores here: https://academy.make.com/courses/AdvancedC01

You can initialize it with a value that says at what time the module is allowed to run. Then when you get to the module, it can check whether it should run or not. Once it’s run, you can add 24 hours to that value or set it to midnight the next day, or something like that.

Then, using a router, you can have one path (path1) end with your once-a-day module and another one (path2) for the rest of the scenario.

If path2 requires the output of the module, then you can set values (using the Set Values module) at the end of path1 and use them in path2.

Hope that helps!

L

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of one module and one filter.

Simply check the scenario logs from the start of the day, and return 1 result.

Then, add a filter after to continue only if there are no results (not yet run today).

Demo

First run:

Subsequent runs:

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":1,"module":"make:listScenarioLogs","version":1,"parameters":{"__IMTCONN__":1},"mapper":{"from":"{{parseDate(formatDate(now; \"YYYY-MM-DD 00:00:00\"))}}","limit":"1","status":"1","scenario":"{{var.scenario.id}}"},"metadata":{"designer":{"x":0,"y":0},"parameters":[{"name":"__IMTCONN__","type":"account:make","label":"Connection","required":true}]}},{"id":2,"module":"util:SetVariable2","version":1,"parameters":{},"filter":{"name":"first run of day","conditions":[[{"a":"{{1.`__IMTLENGTH__`}}","o":"number:equal","b":"0"}]]},"mapper":{"name":"test","scope":"roundtrip","value":""},"metadata":{"designer":{"x":300,"y":0}}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

@Lewis_AP Can you please share the screenshot of scenario.

Glad I could be of assistance!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.