Widget that shows text based on date and time

I searched an app that shows a certain text in a widget at a certain moment of day and time.

The idea is that I can see in a widget what I can eat at that time. So on Monday morning between 6 and 9 a list of products. And between 9 and 12 again another list. etc. etc. That list is different per weekday. And starts again from before after 7 days.

Can something be easily realized with scriptable? And looks nice like an Apple iOS widget?

The timing would likely be approximate (the OS controls when a widget is updated), but yes, you should b able to build that in Scriptable.

Now the only problem is is that I’m a total noob at JavaScript / scriptable. I know some parts but how I get it working I don’t know.

Things you will need to understand:


  • How to store and retrieve data in variables and potentially arrays of variables.
  • Basic use of conditional-style statements.
  • How to check and handle time values.


  • How to layout data on a widget in Scriptable - there are lots of posts on the forum about laying out data in various ways on widgets.

If you want to make your maintenance much easier, I would also suggest learning about:

  • How to work with text files in Scriptable - see fileManager.
  • JavaScript objects and how they relate to JSON.

As you learn about each of the above, you should get the idea of how that could be useful. There will still be general coding and algorithm & data structure design elements that bind everything else together, but if you cover the above, you should have the foundational elements to do what you proposed.