I think you need to share more info before any answer you receive is really helpful.
What is your system (web, windows), what is your db (MS SQL, MySQL, Oracle, Access, Excel, flat file) for starts.
By rent monthly do you mean you've got amount of rent, account and number of months to insert?
First option would be in the app side to loop for i = 1 to number of months and either insert in each loop or add values to a single insert. Second option could be to feed a stored procedure this info and loop there.
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
Then I guess you need to create a table with tasks.
On the top of my head I assume you are going to need job id, account to get the money, account to transfer the money, ammount, job status, day that the job needs to run, date of last processed payment, optionally frequency (in case you want to make payments weekly or every couple months).
Then you create a job that runs probably every night - or once per day, reads the active jobs that need to run on x day everymonth - or if weekly x day every week- and check when you paid that job last time.
The jobs that qualify can be processed, with a couple insert I guess and a couple or more updates, depending on your schema.
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11
adam_k
Veteran Poster
1,057 posts since Jun 2011
Reputation Points: 274
Solved Threads: 205
Skill Endorsements: 11