安排季度代码运行 - PHP [关闭]

I have a PHP website running on windows server (no Cron stuff allowed :)), how can I schedule a PHP code (sending emails) to run every quarter (every 3 months) ? I found ways to utilize Windows Task Scheduler , but in the scheduling triggering options, there is no Quarterly option. Thanks in advance for any help :)

You can use schtasks to run the code every 15 minutes:

schtasks /create /tr 'php foo.php' /sc minute /mo 15

Where you replace foo.php with the actual php script.

If the script should be scheduled every three months (quarterly), use the following command:

schtasks /create /tr 'php foo.php' /sc monthly /mo 3