I'm developing an enrolment system in Octobercms.
I need to check(DB) who has not paid for the enrolments they have enrolled at the end of the month.
And then send an email to the customer informing them to pay.
If onSendDueEmails() is the function, how to call this at the end of the month?.
note: I tried cronjobs but feels like cronjobs isn't a good solution
You mentioned that you have tried cronjobs. I wonder if that means you have also tried OctoberCMS's solution for scheduling tasks...? I have found it to be very robust and easy to use. It is an elegant alternative to having a separate crontab entry for each scheduled task, which can quickly become unmanageable. Here is a simple example of how to use the task scheduler:
Plugin.phpfile:You can schedule however many tasks you wish in your plugin's
Plugin.phpfile. I hope this is helpful!