Send a PDF report with PHP on certain dates automatically

0

Good afternoon:

I have the need to send PDF a Query of MySQL . That is, I need to send a report in PDF according to a query and I need to send it on the 14th and 30th days of each month. This could perhaps send it with phpmailer . But my question is: how can I make the code ReportePDF.php run automatically without my having to execute it? Can it?

Thanks.

    
asked by Juan Pablo Bustamante Luna 10.01.2017 в 19:10
source

1 answer

1

Place it on your account sudo vi / etc / crontab, vi or the editor you use

you add two lines

# m h dom mon dow user  command
  0 7 14 * * usuario php /mi/comando.php
  0 7 30 * * usuario php /mi/comando.php

    
answered by 10.01.2017 / 19:20
source