AllToolKits.com Posted August 5, 2015 Report Posted August 5, 2015 Hi, Using the below link, the cron is runing at a regular interval. http://mysampledomain.com/index.php/cron/?cron_key=txg6s9c0 It will create invoice for a domain. I would like to call a function in a plugin when the invoice is generating from the cron. Is there any Event for that? That means how the plugin will know when ever a invoice is created from cron?
0 activa Posted August 5, 2015 Report Posted August 5, 2015 On 8/5/2015 at 9:55 AM, AllToolKits.com said: Hi, Using the below link, the cron is runing at a regular interval. http://mysampledomain.com/index.php/cron/?cron_key=txg6s9c0 It will create invoice for a domain. I would like to call a function in a plugin when the invoice is generating from the cron. Is there any Event for that? That means how the plugin will know when ever a invoice is created from cron? Invoices.add is your friend http://docs.blesta.com/display/dev/Event+Handlers Michael 1
0 AllToolKits.com Posted August 5, 2015 Author Report Posted August 5, 2015 That will be called even if the invoice is created from web interface. We can use Invoices.add, just ned a way to check weather the it's called after creating the invoice via cron or not.
0 Blesta Addons Posted August 6, 2015 Report Posted August 6, 2015 the event is called when a invoice is added by the Invoice model either by api or cron or web .
0 AllToolKits.com Posted August 6, 2015 Author Report Posted August 6, 2015 Yeah, How i can understand that the invoice is generated from api or cron or web?
Question
AllToolKits.com
Hi,
Using the below link, the cron is runing at a regular interval.
http://mysampledomain.com/index.php/cron/?cron_key=txg6s9c0
It will create invoice for a domain. I would like to call a function in a plugin when the invoice is generating from the cron.
Is there any Event for that? That means how the plugin will know when ever a invoice is created from cron?
5 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now