Recurring billing and automated invoicing
I have a system that sends bills to clients.
With the actual system I have to send bills every 3 days.
So I have to login into the system and manually do it.
I was wondering if that could be done automatically.
I know about cronjobs but that wouldnt work for me because Id have to set a cronjob for every new client and that would have to be done automatically.
Any ideas?
[408 byte] By [
rogernem] at [2007-11-20 8:26:03]

# 1 Re: Recurring billing and automated invoicing
Well, you can use a cron, you would just have to write a script to determine who gets billed when that cron executes.
# 2 Re: Recurring billing and automated invoicing
I dont want to use or set a cron myself.
any other ideas?
Does ANYBODY know that?
Why is it so hard for anyone to answer it?
Has nobody ever done it?
# 3 Re: Recurring billing and automated invoicing
Calm down...It is hard to answer because there is no other way to shedule things without a CRON!!!
What is wrong with creating one cron for all time? In other words you only have to create one, not one for each billing. Then create a PHP script which checks all accounts to see who needs to be billed. What is wrong with this approach?
# 4 Re: Recurring billing and automated invoicing
Im calm lol
Lets say I have 3 clients.
I can create a cron myself. No problems
But lets say tomorrow I have 1000 clients. I cant set 1000 different crons u understand?
Thats why Id like to know how that could be done automatically
What do the companies that send invoices do?
Do they create crons manually?
I dont think they do.
There must be a way to do that.
Thats what Ive been trying to find out and I appreciate your replies.
# 5 Re: Recurring billing and automated invoicing
what PeejAvery is trying to point out is you have to setup your PHP script/page to CRON only once. and your script must be programmed to send billing/invoicing to whoever clients available in your database.
the main purpose of setting up a CRON is to run your PHP script.
this thread is almost the same as the one asking to send auto-emails a while ago :D
# 6 Re: Recurring billing and automated invoicing
They say that the third time is the charm. So let me try explaining this for the third time but as clear and precisely as I possibly can.
First, you would create a PHP script. Let's call it cron_billing.php. Now, everytime from now to eternity, when you run cron_billing.php, it will gather from the database every person to whom an invoice/notification must be sent. Now you set ONE cron and ONLY ONE to run that cron_billing.php script. So from now to eternity, you only have to create one cron and then your done no matter whether you gain 1,000,000 customers. The work lies in the cron_billing.php script.