Remitur Posted February 20, 2025 Share Posted February 20, 2025 There is a certain operation that must be performed at least 5 minutes after the registration of some domains. I could use the AfterCronJob hook, check the domains registered in the last 10 minutes, and then proceed with this operation on those domains (if any), but... how can I identify the domains registered in the last 10 minutes? I haven't been able to find any way to do it... 0 Quote Link to comment Share on other sites More sharing options...
Azhar Patel Posted February 21, 2025 Share Posted February 21, 2025 You can create one custom table where you maintain the domain register with hook PreRegistrarRegisterDomain with date and time https://developers.whmcs.com/hooks-reference/domain/#preregistrarregisterdomain Then write cron for every 10 min, get record from your database table do the needful operation 1 Quote Link to comment Share on other sites More sharing options...
RadWebHosting Posted February 21, 2025 Share Posted February 21, 2025 It would possibly benefit you to create a custom field associated with domain to store timestamp of registration. Then each 10 minutes, check custom field value of the most recent/highest domain if the value satisfies the requirement. If false, stop querying. If true, repeat query, highest domain id not previously checked within this cron. Repeat until a false is returned. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.