partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 400 forks source link

partkeepr:cron:run:synctips cron Job are not running #858

Closed Shaileshkr81 closed 4 years ago

Shaileshkr81 commented 7 years ago

System Information

PartKeepr Version: 1.2.0 - git clone tag 1.2.0 Reproducible on the demo system: No. JavaScript errors: None

Please attach files, for example, screenshots to describe your issue. If you can, create a screenshot ob View->System Information.

I installed everything following the setup guide and wiki. Added a crontab for running app/console partkeepr:cron:run like the setup told me. Verified that running the cmd manually doesn't has errors or something. Still if i login i get the The following cronjobs aren't running, This can be access by this URL--- http://enigma-shop.com/partkeepr/web/

untitled

Drachenkaetzchen commented 7 years ago

There was a server-side problem. Can you try running the cronjob again?

Gasman2014 commented 7 years ago

I have CORRECTLY set the timezone in my php.ini file but the result of running the cronjob from the command line is as follows;

/usr/bin/php /Library/WebServer/Documents/PartKeepr/app/console partkeepr:cron:run

 [Symfony\Component\Debug\Exception\ContextErrorException]
  Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting o
  r the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled
  the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

I have also tried to add ini_set('date.timezone', 'Europe/London'); to web/app.php and web/app_dev.php but my cronjob script still fails with the same error. If this was important I would try harder to get it fixed but I don't see that it does anything much useful.

I think quite a few people seem to have problems with the sync tips. To be perfectly honest I really don't care less about having the tips - there only seem to be five or six of them - I have read them all and if I never see them again I really wouldn't be bothered.I am not sure what they add other than another service that it a point of failure and an annoying error. Please could you consider getting rid of them? I have switched them off in user preferences. Just put them in some documentation - that would be far more useful.

Other than that - great bit of software - well done!

Drachenkaetzchen commented 7 years ago

@Gasman2014 if you set it in app.php and app_dev.php then of course it isn't applied to app/console. Set it globally in your php.ini file and use a phpinfo.php file to verify that it is correctly set.

Ensure that you have restarted your webserver. Also note that for cronjobs, there are usually two php.ini files - one for your webserver and one for your CLI.

Use php -i |grep timezone to find out if your timezone setting is applied correctly to your CLI php.

Drachenkaetzchen commented 7 years ago

You can also disable the cronjob check in your parameters.php file, see parameters.php.template then rerun setup after you made the change.

Drachenkaetzchen commented 7 years ago

@Gasman2014 it would be handy if you could help documenting the several items - I'm mostly the lonely developer who doesn't have too much time documenting everything. The wiki could be used to document things

Gasman2014 commented 7 years ago

I will do what I can when I have a little more time myself - perhaps next month and see if I can add a few hints/tips.

BW

JP

On 19 Jun 2017, at 23:46, Felicia Hummel notifications@github.com wrote:

@Gasman2014 https://github.com/gasman2014 it would be handy if you could help documenting the several items - I'm mostly the lonely developer who doesn't have too much time documenting everything. The wiki could be used to document things

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/partkeepr/PartKeepr/issues/858#issuecomment-309594645, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAyudf5840Mk5DvOKJMyNoFXze_Rkvfks5sFvpYgaJpZM4NmClq.

schneidersoft commented 7 years ago

I have a similar problem. Cronjobs are set to: 0 0,6,12,18 * /usr/bin/php /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/app/console partkeepr:cron:run

as per install instructions yet the error message for synctips still appears after login. running the cronjob command manually gives no output errors or warnings, but the error message still appears after login.

Drachenkaetzchen commented 7 years ago

@schneidersoft do you run the cronjob as the same user as your webserver? Also, what happens if you call php app/console partkeepr:cron:synctips?

schneidersoft commented 7 years ago

Yes both the user running php-cgi for the webserver and the user running the cronjob are the same.

When running the script manually as that user I get:

/usr/bin/php app/console partkeepr:cron:synctips --verbose

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The parameter "partkeepr.tip_of_the_day_list" must be defined.

Exception trace: () at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/app/cache/dev/appDevDebugProjectContainer.php:15019 appDevDebugProjectContainer->getParameter() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/src/PartKeepr/TipOfTheDayBundle/Services/TipOfTheDayService.php:48 PartKeepr\TipOfTheDayBundle\Services\TipOfTheDayService->syncTips() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/src/PartKeepr/TipOfTheDayBundle/Command/SyncTipsCommand.php:20 PartKeepr\TipOfTheDayBundle\Command\SyncTipsCommand->execute() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:264 Symfony\Component\Console\Command\Command->run() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:868 Symfony\Component\Console\Application->doRunCommand() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191 Symfony\Component\Console\Application->doRun() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:122 Symfony\Component\Console\Application->run() at /home/maximilian/projects/pkeeper/partkeepr-1.3.0/partkeepr-1.3.0/app/console:27

partkeepr:cron:synctips [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--]

Forceu commented 6 years ago

I get the same error after upgrading from 1.2.0 to 1.3.0:

sudo -u www-data /usr/bin/php app/console partkeepr:cron:synctips --verbose

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]  
  The parameter "partkeepr.tip_of_the_day_list" must be defined.              

Exception trace:
 () at /var/www/partkeepr/app/cache/dev/appDevDebugProjectContainer.php:15019
 appDevDebugProjectContainer->getParameter() at /var/www/partkeepr/src/PartKeepr/TipOfTheDayBundle/Services/TipOfTheDayService.php:48
 PartKeepr\TipOfTheDayBundle\Services\TipOfTheDayService->syncTips() at /var/www/partkeepr/src/PartKeepr/TipOfTheDayBundle/Command/SyncTipsCommand.php:20
 PartKeepr\TipOfTheDayBundle\Command\SyncTipsCommand->execute() at /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:868
 Symfony\Component\Console\Application->doRunCommand() at /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191
 Symfony\Component\Console\Application->doRun() at /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:122
 Symfony\Component\Console\Application->run() at /var/www/partkeepr/app/console:27
debusser commented 6 years ago

Same here...

sudo -u www-data /usr/bin/php app/console partkeepr:cron:synctips --verbose

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The parameter "partkeepr.tip_of_the_day_list" must be defined.

Exception trace: () at /var/www/html/partkeepr/app/cache/dev/appDevDebugProjectContainer.php:15019 appDevDebugProjectContainer->getParameter() at /var/www/html/partkeepr/src/PartKeepr/TipOfTheDayBundle/Services/TipOfTheDayService.php:48 PartKeepr\TipOfTheDayBundle\Services\TipOfTheDayService->syncTips() at /var/www/html/partkeepr/src/PartKeepr/TipOfTheDayBundle/Command/SyncTipsCommand.php:20 PartKeepr\TipOfTheDayBundle\Command\SyncTipsCommand->execute() at /var/www/html/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:264 Symfony\Component\Console\Command\Command->run() at /var/www/html/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:868 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191 Symfony\Component\Console\Application->doRun() at /var/www/html/partkeepr/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/partkeepr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:122 Symfony\Component\Console\Application->run() at /var/www/html/partkeepr/app/console:27

Drachenkaetzchen commented 6 years ago

I believe the issue is fixed in the current version of PartKeepr, can you check?

This doesn't occur in the latest GIT version and I believe it was already fixed for 1.4.0.

debusser commented 6 years ago

Ok first i need to upgrade to the latest version... But i'm scared to do so. It was a long journey to get it working the first time...

baradhili commented 4 years ago

Duplicate of #850 and #862

baradhili commented 4 years ago

closing this as its resolved in 1.4.0