cron task not fetching mail

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
norbert
Posts: 2
Joined: Sat Apr 01, 2023 12:26 pm

cron task not fetching mail

Post 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
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: cron task not fetching mail

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
norbert
Posts: 2
Joined: Sat Apr 01, 2023 12:26 pm

Re: cron task not fetching mail

Post 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)
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: cron task not fetching mail

Post by Klemen »

Are you 100% sure the /var/www/helpdesk/inc/mail/hesk_pop3.php path is correct?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply