How to send email at a fixed time in different time zones of php

scenario:
assume that the customer is involved in different time zones of ten countries. For example, the time zone set by the American customer is different . Now you need to send a report at 0 o"clock in the customer"s time zone, and the report cannot be prepared in advance. The data should be calculated in real time , and each calculation time is about 15 minutes.

question:

  1. how to send a report at 0 o"clock in each time zone (the customer time zone may increase or decrease, not fixed)?
  2. I don"t know when a timer calls multiple processes to send at the same time.
May.05,2021

well, is it possible to use swoole to use cooperative programs?

or you can use php's pthread, to define a process to do this, and then fork multiple child processes within the process to do it.

or another way of thinking, in fact, there are only a few time zones, is it possible to do this thing in groups according to the time zone?


  1. you can convert other time zones to the corresponding time of the current time zone, and send
  2. at the converted time point.
  3. is sent in queue. Multiple consumers can be set to consume. The execution time will not be too long.
  4. swoole is a good choice for multiple processes
Menu