Cron Error 2.2.0

I have just upgraded my installation of Piwik to 2.2.0 and I am getting the following errors when I try to run the cron task.
After the upgrade I was having issues with the CSS and formatting of the page but that seems to be running okay now (I did not make any changes to my site … it just started working again)

I am running Apache 2.4.6 x64 on Windows Server 2008r2. Also running it on PHP 5.5.11 x64 on the server but found that the cron script was not running, I an older of version of PHP on the server so I have been running the cron job using PHP 5.3.1 x86
If anyone could provide any help it would be greatly appreciated.


INFO CoreConsole[2014-04-22 16:00:01] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 16:00:01] [593c0] INIT
INFO CoreConsole[2014-04-22 16:00:01] [593c0] Piwik is installed at: https://my/site/url/piwik/index.php
INFO CoreConsole[2014-04-22 16:00:01] [593c0] Running Piwik 2.2.0 as Super User
INFO CoreConsole[2014-04-22 16:00:02] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 16:00:02] [593c0] NOTES
INFO CoreConsole[2014-04-22 16:00:02] [593c0] - Reports for today will be processed at most every 1800 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2014-04-22 16:00:02] [593c0] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2014-04-22 16:00:02] [593c0] - Archiving was last executed without error 31 days 22 hours ago
INFO CoreConsole[2014-04-22 16:00:02] [593c0] - Will process 1 websites with new visits since 31 days 22 hours , IDs: 1
INFO CoreConsole[2014-04-22 15:00:02] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 15:00:02] [593c0] START
INFO CoreConsole[2014-04-22 15:00:02] [593c0] Starting Piwik reports archiving...
INFO CoreConsole[2014-04-22 15:00:04] [593c0] Archived website id = 1, period = day, 877 visits in last 2 days, 420 visits today, Time elapsed: 1.795s
INFO CoreConsole[2014-04-22 15:00:05] [593c0] Archived website id = 1, period = week, 2541 visits in last 2 weeks, 877 visits this week, Time elapsed: 1.157s
INFO CoreConsole[2014-04-22 15:00:10] [593c0] Archived website id = 1, period = month, 14801 visits in last 2 months, 5565 visits this month, Time elapsed: 4.594s
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Archived website id = 1, period = year, 74500 visits in last 2 years, 32670 visits this year, Time elapsed: 3.062s
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Archived website id = 1, 4 API requests, Time elapsed: 10.615s [1/1 done]
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Done archiving!
INFO CoreConsole[2014-04-22 14:53:29] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 14:53:29] [593c0] SUMMARY
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Total visits for today across archived websites: 420
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Archived today's reports for 1 websites
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Archived week/month/year for 1 websites
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Skipped 0 websites: no new visit since the last script execution
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Skipped 0 websites day archiving: existing daily reports are less than 1800 seconds old
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Total API requests: 4
INFO CoreConsole[2014-04-22 14:53:29] [593c0] done: 1/1 100%, 420 vtoday, 1 wtoday, 1 wperiods, 4 req, 10618 ms, no error
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Time elapsed: 10.618s
INFO CoreConsole[2014-04-22 14:53:29] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 14:53:29] [593c0] SCHEDULED TASKS
INFO CoreConsole[2014-04-22 14:53:29] [593c0] Starting Scheduled tasks... 
INFO CoreConsole[2014-04-22 14:53:45] [593c0] ERROR: Got invalid response from API request: https://my/site/url/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=10c667d002cbf09fc081a08aff835866&trigger=archivephp. Response was '<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
        <strong>There is an error. Please report the message (Piwik 2.2.0)
        and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
        Warning:</strong> <em>rename(C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat.new,C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat): The process cannot access the file because it is being used by another process. (code: 32)</em> in <strong>C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php</strong> on line <strong>268</strong>
<br /><br />Backtrace --><div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik\Error::errorHandler(...) called at [:]<br />
#1  rename(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:268]<br />
#2  Piwik\Plugins\UserCountry\GeoIPAutoUpdater::unzipDownloadedFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:156]<br />
#3  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->downloadFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:95]<br />
#4  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->update(...) called at [:]<br />
#5  call_user_func(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:196]<br />
#6  Piwik\TaskScheduler::executeTask(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:137]<br />
#7  Piwik\TaskScheduler->doRunTasks(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:81]<br />
#8  Piwik\TaskScheduler::runTasks(...) called at [C:\Webservices\htdocs\piwik\plugins\CoreAdminHome\API.php:39]<br />
#9  Piwik\Plugins\CoreAdminHome\API->runScheduledTasks(...) called at [:]<br />
#10  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\API\Proxy.php:209]<br />
#11  Piwik\API\Proxy->call(...) called at [C:\Webservices\htdocs\piwik\core\API\Request.php:215]<br />
#12  Piwik\API\Request->process(...) called at [C:\Webservices\htdocs\piwik\plugins\API\Controller.php:31]<br />
#13  Piwik\Plugins\API\Controller->index(...) called at [:]<br />
#14  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:505]<br />
#15  Piwik\FrontController->doDispatch(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:85]<br />
#16  Piwik\FrontController->dispatch(...) called at [C:\Webservices\htdocs\piwik\core\dispatch.php:34]<br />
#17  require_once(...) called at [C:\Webservices\htdocs\piwik\index.php:47]<br />
</div><br />
 </pre></div><br />
task,output
GeoIPAutoUpdater.update,Time elapsed: 15.166s'
INFO CoreConsole[2014-04-22 14:53:45] [593c0] done
INFO CoreConsole[2014-04-22 14:53:45] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 14:53:45] [593c0] ---------------------------
INFO CoreConsole[2014-04-22 14:53:45] [593c0] SUMMARY OF ERRORS
INFO CoreConsole[2014-04-22 14:53:45] [593c0] Error: Got invalid response from API request: https://my/site/url/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=10c667d002cbf09fc081a08aff835866&trigger=archivephp. Response was '<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
        <strong>There is an error. Please report the message (Piwik 2.2.0)
        and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
        Warning:</strong> <em>rename(C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat.new,C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat): The process cannot access the file because it is being used by another process. (code: 32)</em> in <strong>C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php</strong> on line <strong>268</strong>
<br /><br />Backtrace --><div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik\Error::errorHandler(...) called at [:]<br />
#1  rename(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:268]<br />
#2  Piwik\Plugins\UserCountry\GeoIPAutoUpdater::unzipDownloadedFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:156]<br />
#3  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->downloadFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:95]<br />
#4  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->update(...) called at [:]<br />
#5  call_user_func(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:196]<br />
#6  Piwik\TaskScheduler::executeTask(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:137]<br />
#7  Piwik\TaskScheduler->doRunTasks(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:81]<br />
#8  Piwik\TaskScheduler::runTasks(...) called at [C:\Webservices\htdocs\piwik\plugins\CoreAdminHome\API.php:39]<br />
#9  Piwik\Plugins\CoreAdminHome\API->runScheduledTasks(...) called at [:]<br />
#10  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\API\Proxy.php:209]<br />
#11  Piwik\API\Proxy->call(...) called at [C:\Webservices\htdocs\piwik\core\API\Request.php:215]<br />
#12  Piwik\API\Request->process(...) called at [C:\Webservices\htdocs\piwik\plugins\API\Controller.php:31]<br />
#13  Piwik\Plugins\API\Controller->index(...) called at [:]<br />
#14  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:505]<br />
#15  Piwik\FrontController->doDispatch(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:85]<br />
#16  Piwik\FrontController->dispatch(...) called at [C:\Webservices\htdocs\piwik\core\dispatch.php:34]<br />
#17  require_once(...) called at [C:\Webservices\htdocs\piwik\index.php:47]<br />
</div><br />
 </pre></div><br />
task,output
GeoIPAutoUpdater.update,Time elapsed: 15.166s'
INFO CoreConsole[2014-04-22 14:53:45] [593c0] 1 total errors during this script execution, please investigate and try and fix these errors
INFO CoreConsole[2014-04-22 14:53:45] [593c0] ERROR: 1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: https://my/site/url/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=10c667d002cbf09fc081a08aff835866&trigger=archivephp. Response was '<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
        <strong>There is an error. Please report the message (Piwik 2.2.0)
        and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
        Warning:</strong> <em>rename(C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat.new,C:\Webservices\htdocs\piwik/misc/GeoIPCity.dat): The process cannot access the file because it is being used by another process. (code: 32)</em> in <strong>C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php</strong> on line <strong>268</strong>
<br /><br />Backtrace --><div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik\Error::errorHandler(...) called at [:]<br />
#1  rename(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:268]<br />
#2  Piwik\Plugins\UserCountry\GeoIPAutoUpdater::unzipDownloadedFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:156]<br />
#3  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->downloadFile(...) called at [C:\Webservices\htdocs\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:95]<br />
#4  Piwik\Plugins\UserCountry\GeoIPAutoUpdater->update(...) called at [:]<br />
#5  call_user_func(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:196]<br />
#6  Piwik\TaskScheduler::executeTask(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:137]<br />
#7  Piwik\TaskScheduler->doRunTasks(...) called at [C:\Webservices\htdocs\piwik\core\TaskScheduler.php:81]<br />
#8  Piwik\TaskScheduler::runTasks(...) called at [C:\Webservices\htdocs\piwik\plugins\CoreAdminHome\API.php:39]<br />
#9  Piwik\Plugins\CoreAdminHome\API->runScheduledTasks(...) called at [:]<br />
#10  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\API\Proxy.php:209]<br />
#11  Piwik\API\Proxy->call(...) called at [C:\Webservices\htdocs\piwik\core\API\Request.php:215]<br />
#12  Piwik\API\Request->process(...) called at [C:\Webservices\htdocs\piwik\plugins\API\Controller.php:31]<br />
#13  Piwik\Plugins\API\Controller->index(...) called at [:]<br />
#14  call_user_func_array(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:505]<br />
#15  Piwik\FrontController->doDispatch(...) called at [C:\Webservices\htdocs\piwik\core\FrontController.php:85]<br />
#16  Piwik\FrontController->dispatch(...) called at [C:\Webservices\htdocs\piwik\core\dispatch.php:34]<br />
#17  require_once(...) called at [C:\Webservices\htdocs\piwik\index.php:47]<br />
</div><br />
 </pre></div><br />
task,output
GeoIPAutoUpdater.update,Time elapsed: 15.166s'


Sorry I couldn’t see a way to edit my post, but I managed to recreate the problem with the formatting being lost.
When I create an email report my installation of piwik just breaks losing all its CSS styling and won’t let me delete the report.

For this cron error I created a ticket: Windows: rename(C:\misc/GeoIPCity.dat.new,C:\misc/GeoIPCity.dat): The process cannot access the file because it is being used by another process. (code: 32) · Issue #5050 · matomo-org/matomo · GitHub