Automatic restart script at the end of each month

I want a script for my MK RB750GR3 to restart every month, since some months have 30 or 31 days and February has 28 or 29. I want one that understands that it is the end of the month and restarts at midnight at the beginning of the month.

What I know how to do is restart every day at midnight. And I don’t see the need to restart every day.

If anyone has this script or uses it, please share it with me, I would appreciate it.

i think this will help you
you can change interval tp 30days