What is the response for Woocommerce Cron Job?
Hello i have finally set up my crontab but the response that i'm getting is just the WebPage HTML, CSS and JS code, like it is just downloading the Page.
I have set up my cron tab like this:
*/15 * * * * php7.1 /kunden/homepages/15/blablabla/htdocs/newpdv/index.php ecommerce cron http://myposinstalationURL
For obvious reasons i have changed the directory info and the POS Url, and what i'm getting in response is this:
<!DOCTYPE html>
<html>
<head>
<title>Monkiko´s Store -- Desarrollado por PHP Point Of Sale</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<base href="http://localhost/" />
<link rel="icon" href="http://localhost/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="http://localhost/assets/css/all.css?1546375359" />
<script src="http://localhost/assets/js/jquery.js?1546375359" type="text/javascript" language="javascript" charset="UTF-8"></script>
<style type="text/css">
body
{
padding: 5px;
}
</style>
<script type="text/javascript">
$(document).ready(function()
{
//If we have an empty username focus
if ($("#username").val() == '')
{
$("#username").focus();
}
else
{
$("#password").focus();
}
$(".checkForUpdate").click(function(event)
{
event.preventDefault();
$('#spin').removeClass('hidden');
$.getJSON($(this).attr('href'), function(update_available)
{
$('#spin').addClass('hidden');
if(update_available)
{
$(".checkForUpdate").parent().html("Hay una actualizaci\u00f3n disponible <a href=\"http:\/\/phppointofsale.com\/downloads.php\" target=\"_blank\">Descargar ahora<\/a>");
}
else
{
$(".checkForUpdate").parent().html("La actualizaci\u00f3n no est\u00e1 disponible");
}
});
});
});
</script>
</head>
<body>
<div class="flip-container">
<div class="flipper">
<div class="front">
<!-- front content -->
<div class="holder">
<div class="heading login-logo">
<img src="http://localhost/index.php/app_files/view/1?timestamp=-62169958800" alt="" /> </div>
<form action="http://localhost/index.php/login?continue=" class="form login-form" id="loginform" autocomplete="off" method="post" accept-charset="utf-8">
<p>
Bienvenido al sistema PHP Point of Sale. Para continuar, inicie sesión utilizando su ID de usuario y contraseña. </p>
<input type="text" name="username" value="" id="username" class="form-control" placeholder="Usuario" size="20" />
<input type="password" name="password" value="" id="password" class="form-control" placeholder="Contraseña" size="20" />
<div class="bottom_info">
<a href="http://localhost/index.php/login/reset_password" class="pull-right flip-link to-recover">Olvidé mi contraseña?</a>
<span><a href="http://localhost/index.php/login/is_update_available" class="checkForUpdate pull-left">Buscar actualizaciones</a></span>
<span id="spin" class="hidden">
<i class="ion ion-load-d ion-spin"></i>
</span>
</div>
<div class="clearfix"></div>
<button type="submit" class="btn btn-primary btn-block">Iniciar sesión</button>
</form>
<div class="version">
<p>
<span class="badge bg-success">16.3</span> Desarrollado el 29-01-2019 11:18 am EST </p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Am i doing something wrong??
Comments
17 comments
Make sure you put full path to php executable. Also try running the command without the cron and see if we you get similar results. If you want to give me the exact command; send the info to support@phppointofsale.com
Hello Chris, i did as you said and deleted the CRON part from the crontab and the response was this:
Did you put the full path to php something like /usr/bin/php? Also make sure your url has https:// (php pos url).
If you open a private support ticket I would like to see your full command with url. I can also connect to your server and have a look too
Chris is there any way we could Chat?? this ticket system and the community are really not working for me, it takes too long for you to respond and when you do i'm not at the computer and it takes forever to get anywhere
Ok thank you Chris, it seems we finally are online at the same time.
I will open a ticket to give you all the information.
I sent you a message trough Whatsapp
I have the same issue, Metalsniper63 are you solved it
If you send a message to support@phppointofsale.com with your server info we can take a look
Olver Jimenez, in my case this was the issue:
The correct form was to include -cli for PHP like this:
I add *-cli* but the response is the same html, css and js code. this is the structure
*/15 * * * *php -cli /home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://pos.wwwservidordemo.com/I do too this structure and the result is same
*/15 * * * */usr/bin/php -cli /home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://titapapeleria.wwwservidordemo.com/if the -cli command I paste it either this way php-cli or /usr/bin/php-cli mark command errorIt would normally be php-cli NOT a space after php. But you would need to type which php-cli to find out where the full path is for php-cli
Good Morning Chris, what info do you need from my server
Please email support@phppointofsale.com with your cpanel login
When I use PHP-CLI without space I get a command error
Not all servers have php-cli. I would e-mail your host and ask them what is full path to php you should use for cron tasks
I already verified the php path with my provider and I am correct it mustbe with /usr/bin/php
and I already check the cron task and if it is executed correctly but
still does not perform the update in the POS.
*/15 * * * * /usr/bin/php/home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://pos.wwwservidordemo.com/You tried the above?
Please sign in to leave a comment.