Delete product after time period

i have problem, i can’t do function with delete product after time period. I was found this:
https://wisdmlabs.com/blog/delete-products-woocommerce-shop-specific-time-period/
but dont work in my site, i don’t know what i do wrong. Please help 🙂

and sorry for my english