php - Crontab Not Working Ubuntu -
i using crontab in ubuntu send csv email everyday, 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 , send csv email in crontask.php. wanna see log of cron log cronoutput.txt.
what's problem?
because i'm using laravel, need use laravel artisan command run crontab in ubuntu. referred site create command: https://sonnguyen.ws/laravel-4-and-crontab/
then put csv generation , email fire function. it's done.
app/commands/firstcommand.php
- php artisan command:make firstcommand
- change protected $name = 'user:active';
- add generate csv , email in fire function. eg: echo "user activated"
- remove arguments in array in getarguments function
app/start/artisan.php
- artisan::add(new firstcommand);
in terminal:
crontab -e command in crontab:
* * * * * /usr/bin/php /var/www/html/project/artisan user:active >> /var/www/html/project/public/cronoutput.txt
Comments
Post a Comment