문제

I need to run a script at 2 pm on the end of every month. The reason i set 2 pm is i've a timezone of asia/calcutta and it differs 10 hrs and 30 min. from the server time.

I've set date_default_timezone_set('Asia/Calcutta') in my script, so for the current settings i can trigger 1st day of every month as per my timezone.

But the issue is, i'm using webmin and there is no settings to run end of every month and only date from 1 - 31 listed. Here i attached the screenshot.
enter image description here

How can i run the script on end of the every month at 2pm?

Any help greatly appreciated, Thanks!.

도움이 되었습니까?

해결책

The simple way, but ugly

is set to run on every 28,29,30,31 days. Each time when script is launched compare current day with max days in current month using bash/oerl script

다른 팁

Have it run every day starting the 28th of every month through the first of the next month. In the script, check if tomorrow is the first day of a month. If so, run, else die.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top