Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable start cron schedulation after update to 12.2.3 #1126

Open
corasaniti opened this issue Jun 25, 2023 · 7 comments
Open

[BUG] Unable start cron schedulation after update to 12.2.3 #1126

corasaniti opened this issue Jun 25, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@corasaniti
Copy link

Glad to see the project is not dead and abandoned. Glad to have seen a release after a long time

There is a reason why the following crontab doesn't work after upgrading to version 1.12.3
30 */2 * * *

At 8.30 this morning he did not leave. Did you change something you need to set the timezone?

Here is my docker command

docker create \
      --name=speedtest\
      --hostname=speedtest\
      --dns 8.8.8.8 \
      -p 8888:80 \
      -v ${PWD}/config:/config \
      -e OOKLA_EULA_GDPR=true \
      --restart unless-stopped \
      henrywhitaker3/speedtest-tracker:dev

Thanks in advance

@corasaniti corasaniti added the bug Something isn't working label Jun 25, 2023
@BrianLakstins
Copy link

I also don't seem to see any automatically run hourly tasks.

The "Test Again" button works to run a manual test.

@Dari74
Copy link

Dari74 commented Jun 25, 2023

I also don't seem to see any automatically run hourly tasks.

The "Test Again" button works to run a manual test.

Go to settings -> General -> Schedule and enter */60 * * * *
(star slash sixty star star star star)

@corasaniti
Copy link
Author

@henrywhitaker3 @Dari74 @BrianLakstins
crontab scheduling seems to work fine. But what are the differences between 1.12.2 and 112.3.
Thanks

@BrianLakstins
Copy link

crontab seems to be working, but the actual speedtest from crontab does not seem to be.

root@07a303a717a8:/# crontab -l
# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly
# speedtest cron
* * * * * php /config/www/artisan schedule:run >> /config/log/speedtest/cron.log
# */5 * * * * php /config/www/artisan queue:retry all >> /config/log/speedtest.cron.log

This is showing in /config/log/speedtest/cron.log file

   Error 

  Class "PDO" not found

  at /config/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1474

   Error 

  Call to undefined function NunoMaduro\Collision\token_get_all()

  at /config/www/vendor/nunomaduro/collision/src/Highlighter.php:138

   Symfony\Component\ErrorHandler\Error\FatalError 

  Uncaught Error: Call to undefined function NunoMaduro\Collision\token_get_all() in /config/www/vendor/nunomaduro/collision/src/Highlighter.php:138
Stack trace:
#0 /config/www/vendor/nunomaduro/collision/src/Highlighter.php(128): NunoMaduro\Collision\Highlighter->tokenize()
#1 /config/www/vendor/nunomaduro/collision/src/Highlighter.php(110): NunoMaduro\Collision\Highlighter->getHighlightedLines()
#2 /config/www/vendor/nunomaduro/collision/src/Highlighter.php(99): NunoMaduro\Collision\Highlighter->getCodeSnippet()
#3 /config/www/vendor/nunomaduro/collision/src/Writer.php(280): NunoMaduro\Collision\Highlighter->highlight()
#4 /config/www/vendor/nunomaduro/collision/src/Writer.php(120): NunoMaduro\Collision\Writer->renderEditor()
#5 /config/www/vendor/nunomaduro/collision/src/Handler.php(39): NunoMaduro\Collision\Writer->write()
#6 /config/www/vendor/filp/whoops/src/Whoops/Run.php(398): NunoMaduro\Collision\Handler->handle()
#7 [internal function]: Whoops\Run->handleException()
#8 {main}
  thrown

  at /config/www/vendor/nunomaduro/collision/src/Highlighter.php:138

@WisdomSky
Copy link

@BrianLakstins I'm experiencing this very same problem. However I made it work by switching the php symlink. the current version, /usr/bin/php is symlinked to /usr/bin/php81 which don't have PDO. But there's a /usr/bin/php82 which has PDO extension included.

$> sudo ln -sf /usr/bin/php82 /usr/bin/php

and then edit the cron entry (crontab -e) into:

* * * * * php /config/www/artisan speedtest:run >> /config/log/speedtest/cron.log

Basically I just replaced the schedule:run into speedtest:run

and now it works fine.

@jaknz
Copy link

jaknz commented Aug 15, 2023

That worked for me too, but it's a kludgy hack. Definitely interested in seeing this officially fixed too.

@WisdomSky
Copy link

That worked for me too, but it's a kludgy hack. Definitely interested in seeing this officially fixed too.

I'm not sure if you can say it's a hack considering that it's just using whatever existing functionality it has.
I mean I didn't install anything or changed any of the code for it to work. I just put things in the right place.

Anyway, there's less hope for it to get "officially" fixed. The last update to the repo was like 2 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants