Delete a database line by condition

Good evening!
I have a silly but simple question about using automatic script conditions and executions in a database.

Indeed I would like to make a JS script that runs every minute in my db, and that allows to compare a new Date() with a date defined in a box of my db (ex : Current Date : 24/08/2018 11:30:50, date in box : 25/08/2018 15:06:48), and that if the new Date() > date_in_the_db_box = delete_line_where_appears_the_date.
How should I do that?

Thanks in advance! (if need more explanation ask me by private message or by under this post)

Jean, you would need an external cron-service for this, because Wix has no one just yet. Google for cron job/service etc. THen you would write a piece of code in Wix Code that does the comparing and deletion and you would run this page from a cron-service every minute.

Hi,
In addition to Giri’s comment I would recommend you to use zapier, check it out here .

Good luck :slight_smile:

Hi !

Omg it looks like hard to practice zapier, i’ll try to see what I can do.