I have enabled the cron job on Windows Server 2012 R2 with Scheduled Task which runs without any error, the emails are not being fetch. Recently move to another server and it stopped working. Changed all the PHP folder paths and new hosting path handjob.bat file with below line"C:\Program Files\PHP\v7.0\php.exe" -f C:\inetpub\website\support\api\cron.php

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.Same OS as me, and almost the same .bat file. (paths differ)Works on my server.  Must be a TaskSched setting issueyou've checked your php error logs?you've checked your (unknown) webserver error logs?

The PHP error logs is giving this  PHP Warning:  Declaration of AssignmentForm:($options) should be compatible with Form:($staff = true, $title = false, $options = Array) in C:\inetpub\website\support\include\class.forms.php on line 4150 PHP Warning:  Declaration of TransferForm:($options) should be compatible with Form:($staff = true, $title = false, $options = Array) in C:\inetpub\website\support\include\class.forms.php on line 4270

This is a known PHP 7.x+ issue with a fix here: https://github.com/osTicket/osTicket/pull/3349/filesNOTE: use the change on line 2284 as this is completely unnecessary.Cheers.

9 days later

@[deleted], not sure what to do with the link there, do i need to replace the files? 

You change the file to match the ones he linked.

@[deleted] changed the files but still not workinggetting this error in PHP  PHP Warning:  mail(): SMTP server response: 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain in C:\inetpub\vwebsite\support\include\pear\Mail\mail.php on line 156

I managed to fixed the mail function and getting email notifications alerts but the cron job is still needs some hand jobs to be fixed. any idea?

cron job is not working mate! I have tried with 5.5, 5.6, 7.0, 7.1, 7.2 PHP but still no luck!

Works fine in my production installations.  So I have no idea why it doesn't work for you.  So either you did it wrong or you failed at changing the command line version of PHP that you were using.Based on the mailer error you provided this is not an osTicket issue, and is a mail configuration issue.

@[deleted] I got this in my handjob.bat file "C:\Program Files\PHP\v7.0\php.exe" -f C:\inetpub\website\support\api\cron.phpDo you see any error for commas or any thing at all on this?

what is this error now? PHP Warning:  session_destroy(): Session callback expects true/false return value in C:\inetpub\website\support\scp\logout.php on line 30 PHP Warning:  session_destroy(): Session object destruction failed in C:\inetpub\website\support\scp\logout.php on line 30

what is this error now? PHP Warning:  session_destroy(): Session callback expects true/false return value in C:\inetpub\website\support\scp\logout.php on line 30 PHP Warning:  session_destroy(): Session object destruction failed in C:\inetpub\website\support\scp\logout.php on line 30

Is this the correct cron.php file code for the PHP 7.0?<?php/*********************************************************************    cron.php    File to handle LOCAL cron job calls.    Peter Rotich <peter@osticket.com>    Copyright (c)  2006-2013 osTicket    http://www.osticket.com    Released under the GNU General Public License WITHOUT ANY WARRANTY.    See LICENSE.TXT for details.    vim: expandtab sw=4 ts=4 sts=4:**********************************************************************/@[deleted](dirname(__FILE__).'/'); //Change dir.require('api.inc.php');if (!osTicket:())    die(__('cron.php only supports local cron calls - use http -> api/tasks/cron'));require_once(INCLUDE_DIR.'api.cron.php');LocalCronApiController:();?>

16 days later

@KevinTheJedi your fix for php 7 link stops user raising tickets online - when they enter the details and press create ticket - the page takes them to a blank white page ! 

a blank white page means that you are throwing a PHP error.  Please provide the error from your logs.

7 months later

still having issues with the cron job on windows server 2012 r2 - with osTicket Core, v1.11.0-rc1 (Release Candidate) - any hint on how to fix or make it work? PHP 7.0.27

[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of AssignmentForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in C:\inetpub\website\support\include\class.forms.php on line 4891
[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of ReferralForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in C:\inetpub\website\support\include\class.forms.php on line 5141
[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of TransferForm::render($options) should be compatible with Form::render($staff = true, $title = false, $options = Array) in C:\inetpub\website\support\include\class.forms.php on line 5233
[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of QueueColumnListBroker::update($columns, &$errors, $options = Array) should be compatible with InstrumentedList::update(array $what) in C:\inetpub\website\support\include\class.queue.php on line 2473
[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of AdhocSearch::checkAccess($staff) should be compatible with CustomQueue::checkAccess(Staff $agent) in C:\inetpub\website\support\include\class.search.php on line 909
[04-Dec-2018 22:17:23 UTC] PHP Warning: Declaration of TeamSelectionField::getSortKeys() should be compatible with FormField::getSortKeys($path) in C:\inetpub\website\support\include\class.search.php on line 1262

What PHP Extensions are required to enable make the Cron job work as it might be the extensions issue?