partkeepr / PartKeepr

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

Cronjob could not open input files because cronjobs folder is missing #886

Closed yschroeder closed 7 years ago

yschroeder commented 7 years ago

System Information

Bug Details

My Partkeepr installation cannot find the cronjob php files. sudo crontab -e has the following line:

0 0,6,12,18 * * * /usr/bin/php /var/www/PartKeepr/app/console partkeepr:cron:run

The job tells me, that different files in /var/www/PartKeepr/cronjobs are missing. I've checked and the whole cronjobs folder does not exist.

The files are:

I am not sure since when this problem exists, as due to a misconfiguration cron only recently started to send mails.

What is the problem here? Should the installation have a cronjobs folder?

Drachenkaetzchen commented 7 years ago

There's no cronjob folder. Where exactly does it tell you that /var/www/PartKeepr/cronjobs is missing?

Drachenkaetzchen commented 7 years ago

Actually there used to be a cronjob folder in earlier versions - maybe you still got an old crontab entry in place?

yschroeder commented 7 years ago

The output of the running cronjob says:

Could not open input file: /var/www/PartKeepr/cronjobs/UpdatePartCacheData.php

With different variations of files (see above).

What would be the correct cronjob line? I guess after the update to 1.2.0 it was not changed to the new cronjob?

Drachenkaetzchen commented 7 years ago
Could not open input file: /var/www/PartKeepr/cronjobs/UpdatePartCacheData.php

That is an old cronjob file. This error is emitted from your cron configuration. The correct line is

0 0,6,12,18 * * * /usr/bin/php /var/www/PartKeepr/app/console partkeepr:cron:run

as you have written in your initial bug report. Please find the old lines in your cronjob configuration and remove them.

yschroeder commented 7 years ago

I found the old cronjobs in /etc/cron.d.

The jobs have been a leftover from and old PartKeepr version. Thanks for the help!

Drachenkaetzchen commented 7 years ago

You're welcome, I'm glad you found the old configuration ;)