how can I call a function when time expire
The only way that I know of to perform an action daily (or on another regular interval) is to schedule a cron event. A sustainable way to do that is to write a little plugin that schedules/clear_schedules the cron when activated/deactivated. Here’s a plugin that you could use – I tested to ensure that it … Read more