Originally Posted by
Robbie_79
My host uses a GUI for cron job's, so i'm not able to add any lines.
Would there be a differend way to achive the same?
you dont need to add a line before your cronjob
you have to create a file in the admin folder
for example cron1.php
PHP Code:
<?php
// filename: cron1.php
// make changes in /admin/init_includes/init_admin_auth.php
define('CRON_ADMIN_USER_ID', '13');
define('EMAIL_USE_HTML', false);
require ('includes/application_top.php');
// your code to run via cron
// sends an email listing all orders with status $os
$os = 1;
$sql = 'SELECT orders_id, date_purchased, order_total, payment_method, customers_name FROM ' . TABLE_ORDERS . ' WHERE orders_status=' . $os;
$res = $db->execute($sql);
$content = 'orders_status: ' . $os . "\n\r\n\r";
while (!$res->EOF){
$content .= implode(', ', $res->fields) . "\n\r";
$res->MoveNext();
}
echo 'CRON1 ' . date('Ymd H:i:s');
zen_mail('Admin', STORE_OWNER_EMAIL_ADDRESS, 'ZC open orders', $content, 'ZC Cron1', STORE_OWNER_EMAIL_ADDRESS );
your cronjob command could look like:
Code:
/usr/bin/lynx -accept_all_cookies -dump http://localhost/PathTo/admin/cron1.php
Bookmarks