PHP auto generate pdf file for salaryslip

965 views Asked by At

I am using tcpdf to generate the pdf file for employee salary , how can I sent automatically email employee salary (pdf)to end of the month

1

There are 1 answers

0
Nimeshka Srimal On

You can setup a cronjob to send the email every month end.

59 23 28-31 * * [ "$(date +%d -d tomorrow)" = "01" ] && /path/to/you/script.php

Source: https://blog.nexcess.net/2013/05/09/cron-job-for-the-last-day-of-the-month/