I am using crontab in ubuntu to send a csv to an email everyday, however it's not sending out. Why?
btw, i'm using laravel 4.2
UPDATED CRONTAB crontab:
* * * * * /usr/bin/php /var/www/html/.../app/controllers/CronTask.php > /var/www/html/.../public/cronoutput.txt
The functions of generating csv and send the csv to email are in CronTask.php. I wanna see the log of the cron so the log is cronoutput.txt.
What's the problem?
Because i'm using laravel, so need to use laravel artisan command to run the crontab in ubuntu. i referred to this site to create command: https://sonnguyen.ws/laravel-4-and-crontab/
then put all the csv generation and email to fire function. it's done.
app/commands/FirstCommand.php
app/start/artisan.php
in terminal:
crontab -e
command in crontab:
* * * * * /usr/bin/php /var/www/html/project/artisan user:active >> /var/www/html/project/public/cronoutput.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With