Can you please tell me where to look as to why my past due emails are not being generated and sent? Is this something that needs to be setup in cron? Or should Invoice Ninja be handling this internally?
I have a couple past due accounts, and I am not seeing Invoice Ninja create the emails even though the initial invoice was sent and I even tried to send the initial invoice again to try and kick it back off, but for some reason, nothing, no follow up emails set to send every 7 days.
For emails to be automatically sent you need to have
artisan ninja:send-invoices and
artisan ninja:send-reminders setup in your crontab.
For mine, I have it setup to do both at 10:15am every day, so it would look like
15 10 * * * /usr/bin/php /var/www/ninja/artisan ninja:send-invoices >/dev/null 2>&1
15 10 * * * /usr/bin/php /var/www/ninja/artisan ninja:send-reminders >/dev/null 2>&1
>/dev/null 2>&1 with whatever you like if you prefer saving the output messages to a file rather than just chucking them straight into the trash.)
Thank you very much! Unfortunately, I don’t have any outstanding invoices to test this with since the invoices we all paid before I could enter this in! I guess thats a good things, however, I used the following to test that there were no errors, and looks good thus far. The current invoice which I know will be late to get paid, will be the first to test that this change has worked, so I will check back in a week lol
Thank you very much for the quick reply and solution! Greatly appreciated!
PS- is this in the knowledge base? I looked for something regarding a crontab entry in the knowledge base and came up with nothing.If its not, this would be an excellent thing to add to the post install steps.
However, what I find odd, is based upon looking at cron.daily I can see that the only ninja entry is from the version update however, I know this used to work because I got complaints about getting too many reminders from a client until I marked his invoice as paid, so has something changed or has this always been the case?
Thanks again Titanfail!!
It’s in the configuration section of the documentation.
As for it working previously then not, I’m not sure (just a user, not a dev). Seems like something might have affected the way your crons are setup.
On my own system, I just put the update script and the artisan commands in the root crontab, since the update script is meant to run that way anyhow, and with an encrypted home folder, nothing I run from userland would work unless I’m actually logged in via SSH.
Upshot is I’m (fairly) certain nothing can mess with that unless I specifically authorize it.
Thats a smart idea… I never thought to encrypt that home folder, however, that might now work well in my situation because I am using the server for multiple applications, as well, I am using IFrame for the Portal, (I don’t know if that would have any affect on the iFrame) though I also give my clients the ability to go directly to the URL if they prefer not to use it through my Company’s Web page.
However, I have it setup using htpasswd, so no one can access anything on my server except for the Client Portal without having a login to the server, and I don’t keep the root account in there. I have special accounts I set up for that.
Invoice Ninja was really smart in the way they block access to any directory anyway that is not to be seen by prying eyes, so I am fairly confident in the way I have my VPS setup that my server is quite secure. Also having a background in Systems Admin and being ITIL certified, I tend to lock everything down anyway. While encrypting the home directory would be an excellent added security measure, I think with the measures I have taken which extend past what I have already mentioned, it would take some one who really really wanted to access the server and get places they shouldn’t in order to get access to them. For example, I don’t use the recommended www root directory names, nor do I use common names for my Web App installations, which is a bit of a pain because sometimes I forget what I named them and can’t recall the URL’s lol
Thanks again for the help and the suggestions!