Semi-static date in variable

Hi,

I need to have a variable which tells me the timestamp of the previous Thursday at 22:30:00.

I added a ‘Date and Time’ and a variable, and then i thought to use a until function, but got stuck with what value to pass.

the reason for this is that i’m creating a dashboard which shows real-time server performance, and for a section on this dashboard, which shows reboot time of services, i need to perform a check between the start time of the service and the reboot time, which is on Thursdays nights.

Does any one have an idea how to do this?

Regards,

Nick

Without going into deep these could be your requirements:

Variant A:

  • You need to catch Server Infos (Reboot time and services…)
  • You store reboot time + start time of services in a table (mysql etc) via PHP.
  • You call that PHP via cronjobs.

Variant B:

  • You fetch data from logfiles or parse them (no DB needed)

Variant C:

Maybe there is a Variant C with Wappler only… (except server tasks) mostly server relevant tasks which really needs a serverside scheduler (Wappler Scheduler)… only runs if your On Page…(right?)

Variant D:

  • You use a thirdparty provider which monitors pings your services. There are a lot of them. You pay monthly fees. Anyway this could be a good way to solve problems as you wont be able to run your script if your server isnt online. Makes sense?

Hi,

Thanks, but i’m only referring to a variable within Wappler

All the data is already coming from a PostgreSQL DB, the only thing that is missing is the semi-static value which tells the last Thursday( ie: 03-10-2019 22:30:00 for this week, and on Friday this week, it should show 10-10-2019 22:30:00).

With this value I then can perform a check to see if the services start times are after this Thursday value and then show it in red.