'Start script from cron every 9 days

I saw some questions hire, about how start cron every n-days. But I can not understand some logical steps how it works.

I need to start cron every 9 days for one script (send notofication to email), every 10 days for others (poweroff the server), then every 14 days (send notofication email) and every 15 days (delete the server).

If you could help me understand logical, how it works, I would be glad.

For example, how to set cron job for every 45 days:

10 13 * * * test $(( date +%s/24/60/60\%45 )) = 41 && your_script but I can understand what I should to change to use in my case? 45 to 9?, 45 to 10?

Could you please help with advice?



Solution 1:[1]

Suggesting to read more about cron scheduling here.

Also you can practice the scheduling configuration here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dudi Boy