AllToolKits.com Posted August 5, 2015 Report Share 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? Quote Link to comment Share on other sites More sharing options...
0 activa Posted August 5, 2015 Report Share 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? Invoices.add is your friend http://docs.blesta.com/display/dev/Event+Handlers Michael 1 Quote Link to comment Share on other sites More sharing options...
0 AllToolKits.com Posted August 5, 2015 Author Report Share 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. Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted August 6, 2015 Report Share Posted August 6, 2015 the event is called when a invoice is added by the Invoice model either by api or cron or web . Quote Link to comment Share on other sites More sharing options...
0 AllToolKits.com Posted August 6, 2015 Author Report Share Posted August 6, 2015 Yeah, How i can understand that the invoice is generated from api or cron or web? Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted August 7, 2015 Report Share Posted August 7, 2015 i don't think is possible .... Quote Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
5 answers to this question
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.