I followed the post that said to go to cpanel and enter it there. im sorry, im a slight novice to php coding, should i be adding a file and then entering in my browser? I hope someone can help, im learning but im confused w/ how to do this
I have attached a file. Open it up and edit the first couple of rows that asks about your database info. Save and upload to your root magento directory. then go to yoursite.com/cronmon.php
If your cron is working you will see a heap of pending and past jobs. To make sure it is working refresh it every 5 minutes (your cron interval) to see new jobs. If your cron is not working you will
a/get an error
b/the jobs will not change.
the other thing is edit the your cron.php file in the magento directory and add the above code( the email one) to the bottom of the file. It will send you an email each time the cron is activated.
Ok i tried this but im getting an error. the server spot , i just put the ip of my site right? i tried both that and my website lurebeauty.com along with my db username/password and db name but im getting:
Magento Cron Schedule
for [username was here]@[server here]
Warning: mysql_connect() [function.mysql-connect]: Host ‘ is not allowed to connect to this MySQL server in /cronmon.php on line 18
Unable to select database
//================================================================ //insert your database info here $server='MySQL-V5-004.web24.net.au:3306'; $user='magentouser'; $pass='password123'; $db='Magento_db'; //end data input //================================================================
Your cronmon.php file should look something like that. The $server variable is the database. Are you using cPanel or plesk? If so you should be able to go in and find your server address. Also you would have had to have it when you did the original install of magento.
Im actually working on it right now and still couldn’t get it to work but my server address doesn’t look like that. im using cpanel ... i will look for that info here.
can i just say im really grateful for your help.
when i did the original install i just needed the db name or ip address but it didnt look like that :( You said the server is the db but theres already a field for the DB at the last line?
I just dont see where to find the variable that looks like your first line
thanks. no matter what i do it doesnt work. I put my server ip address, i put the server ip and then ort and it doesnt work, i keep getting “unable to connect to database”
I use a remote store manager and im able to get that to work just fine, yet when i go to the cron job i get an error
Warning: mysql_connect() [function.mysql-connect]: Host ‘174.133.101.14’ is not allowed to connect to this MySQL server in etc etc cronmon.php on line 18
Unable to select database
the top looks like that with all the pendings, but nothing says successful, the only thing its showing is the newsletters waiting to go out. i dont know what im doing wrong :(
Ok basicly this is showing that your cron is not executing.
edit your cron.php file (it is in the root directory) and add the following to the end of the file. You just need to change to your email
//email addition
$to = "you@yousite.com"; $subject = "Cron Mail"; $message = "Cron is active ". date('l jS \of F Y h:i:s A'); $from = "info@lurebeauty.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers);
Your file should look like
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */
require 'app/Mage.php';
if (!Mage::isInstalled()) { echo "Application is not installed yet, please complete install wizard first."; exit; }
// Only for urls // Don't remove this $_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']); $_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);