Page 1 of 1

cron task not fetching mail

Posted: Sat Apr 01, 2023 12:46 pm
by norbert
Script URL: /var/www/helpdesk/inc/mail/hesk_pop3.php/usr/bin/php
Version of script: 3.4.2?
Hosting company: internal test linux server
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: CRONjob not retrieving pop3 email

Write your message below:

I am testing out retrieving mail via pop3:

This works
When I test it using https://helpdesk.server.com/inc/mail/he ... qRStuVwXyZ

This does not work when added to my cron tab

Code: Select all

*/5 * * * * /usr/bin/php /var/www/helpdesk/inc/mail/hesk_pop3.php/usr/bin/php

Re: cron task not fetching mail

Posted: Sat Apr 01, 2023 1:38 pm
by Klemen
The path is most likely wrong, especially the "/usr/bin/php" at the end. It should be something like:

Code: Select all

*/5 * * * * /usr/bin/php -q /var/www/helpdesk/inc/mail/hesk_pop3.php
Also, make sure the hesk_pop3.php is CHMOD-ed to 755

Re: cron task not fetching mail

Posted: Sat Apr 01, 2023 6:15 pm
by norbert
Thanks for that. I did have most of it correct, just not the "-q" and I probably just mistyped the command line info when I was posting here.

In any event, I did update it and mail is still not being retrieved.
  • I checked permissions and it is set to 0755.
  • When I drop to the command line and enter the command mail I get this error:

Code: Select all

 /usr/bin/php -q /var/www/helpdesk/inc/mail/hesk_pop3.php
Could not open input file: /var/www/helpdesk/inc/mail/hesk_pop3.php
I digress for a moment but I am somewhat new to Linux and the "Windows" guy in our company but our Linux guy quit and our boss wantsuse to move to Linux and cut back on Windows licenses(siigghhh LOL)

Re: cron task not fetching mail

Posted: Sat Apr 01, 2023 7:01 pm
by Klemen
Are you 100% sure the /var/www/helpdesk/inc/mail/hesk_pop3.php path is correct?