Setting up Scheduled Task for overdue tickets

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
markdewet
Posts: 6
Joined: Sun May 22, 2022 1:37 am

Setting up Scheduled Task for overdue tickets

Post by markdewet »

Script URL: /cron/email_overdue_tickets.php
Version of script: 3.2.5
Hosting company: Hosted at home on XAMPP 7.4.29 on Windows 10
URL of phpinfo.php: Not sure how to upload link from my PC however phpinfo displays fine
URL of session_test.php: N/A
What terms did you try when SEARCHING for a solution:

Write your message below:
Hi, I have recently re-installed Hesk as I had an issue with IIS, so moved to XAMPP. All is working 100% so far, but now I would like to set up the scheduled task in Windows for the Overdue Tickets email script/cronjob. I followed the instructions for Windows as per this link: https://www.hesk.com/knowledgebase/?article=103 but when I test run the sheduled task the page opens up with the text: #!/usr/bin/php -q displayed. I am sure this is not correct so where have gone wrong please?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Setting up Scheduled Task for overdue tickets

Post by Klemen »

You can ignore the "#!/usr/bin/php -q" message as it's the Unix shebang line.

If you turn Debug mode ON in Admin > Settings > Help desk > Features, you should see the full output message. Debug mode should be disabled for live use though.
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
markdewet
Posts: 6
Joined: Sun May 22, 2022 1:37 am

Re: Setting up Scheduled Task for overdue tickets

Post by markdewet »

@Klemen,
Thank you so much! It seems it is working as it should as I now get the following: #!/usr/bin/php -q Starting overdue tickets notification process Found 0 tickets that are overdue.
Thank you again. Is there any way to have the "Starting overdue tickets notification process Found 0 tickets that are overdue." display instead of "#!/usr/bin/php -q" or alternatively disable/hide the "#!/usr/bin/php -q" message?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Setting up Scheduled Task for overdue tickets

Post by Klemen »

You can remove the entire

Code: Select all

#!/usr/bin/php -q
line from the file itself, it is not needed on Windows.

I strongly recommend keeping debug mode OFF for live help desks. You can enable it manually for this file only by adding

Code: Select all

$hesk_settings['debug_mode']=1;
after line

Code: Select all

require(HESK_PATH . 'hesk_settings.inc.php');
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
markdewet
Posts: 6
Joined: Sun May 22, 2022 1:37 am

Re: Setting up Scheduled Task for overdue tickets

Post by markdewet »

@Klemen,
Again, thank you so much! I have disabled DEBUG Mode in settings and removed the line as mentioned, then inserted the line as mentioned to enable the debug for the php file only and all is working perfectly. I cannot thank you enough!
Post Reply