codestudiohq / laravel-totem

Manage Your Laravel Schedule From A Web Dashboard
MIT License
1.78k stars 224 forks source link

cron job not running? #92

Closed scoutkirkolson closed 6 years ago

scoutkirkolson commented 6 years ago

I have installed the Totem package and added both a cronjob and a task in Totem to run the scheduled commands in Kernel.php. Both have a frequency of every minute. The cron job that I added to the crontab (using "crontab -e") is running just fine but nothing is showing up in Totem, and no task results are added in my database.

Am I doing something wrong?

I'm using Laravel 5.5 and Homestead

qschmick commented 6 years ago

@KirkOlson Following up on this, can you provide a little bit more detail.

  1. Do you have the scheduler running from cron as per the documentation:

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1

  1. Do you have the task defined in both the kernel.php and as a Totem task?
  2. If setup as both this will attempt to run the task twice unless you have the flag to stop overlap set then only one instance will run.
  3. What does the Totem page for that task show for the last run time, next run time, and frequency expression?
  4. Just to be clear, Totem will not save any information about a process that is directly run via cron, only tasks that it launches. If you have a process running that is defined within the kernel.php file and the cron process running schedule:run is processing that then Totem will know nothing about it. That means your kernel.php file can be empty and all commands will be defined as tasks within Totem.

Thank you for the additional insight and any other details you might be able to provide.

roshangautam commented 6 years ago

Feel free to jump in to the gitter chat if you are still have this issue. (You can find a link in the readme) We just fixed a similar problem, which was related to cache.