In order to make your invoice recurring you need to:
Go to the view of the invoice and click Edit. Find Recurring invoice option (just after Description, by default it is disabled) and check it in. You will see the following fields:
- Recurring period: frequency of action - from weekly to yearly.
- Recurring action: either create a draft of the invoice or send it directly to the client.
- Recurring occurrences: total times to perform an action. If left blank, it will be performed ad infinitum.
Also, you can create a special email template for your recurring invoices. Go to Administration -> Invoices, Recurring email template tab. Prepare the template, using available macros, and save. It will be used automatically for all recurring invoices. Each time a recurring invoice is sent, the assigned user can be notified if you check that option in.
On UNIX systems, you can schedule automatic execution with a cron job . Customize and add the following line to the
crontab file (in this example, task will be executed every day):
* * */1 * * redmineuser rake -f /path/to/redmine/appdir/Rakefile redmine:invoices:recurring RAILS_ENV="production"
Note: This will not cause invoices to be sent out every day, rather Redmine would check every day if an invoice action is to be performed.
Note: You can manually execute recurring invoice actions through
bundle exec rake redmine:invoices:recurring RAILS_ENV="production" for UNIX,
bundle exec rake redmine:invoices:recurring for Windows.
On Windows systems, you can do the following:
- Create a file called
send_invoices.batcontaining the lines
set RAILS_ENV=production CALL bundle exec rake %*Bitnami users should also edit and add the line
CALL (...)\Bitnami\redmine\scripts\setenv.batat the beginning of the file (replace (...) with the path to your Bitnami folder). Make sure to save with ANSI encoding (the default with Windows Notepad).
- Open Windows Task Scheduler and click Create Task....
- You should check the various options, but two things are core:
- With a Trigger you can set up the frequency of task execution;
- Add an Action with the following parameters:
Start a program
path\to\send_invoices.bat(the file we created at step 1)
- Add arguments(optional):
- Start in(optional):