cron job

Status
Not open for further replies.

HussamT

New Member
Messages
23
Reaction score
0
Points
1
/usr/bin/php "/home/hussam/public_html/cron.php?cron_key=abcdef" >>/home/hussam/public_html/cronlog.txt 2>&1

replace abcdef with the cron_key

I get
Status: 404 Not Found
X-Powered-By: PHP/5.2.17
Content-type: text/html

No input file specified.

in the log
the cron.php permissions are 755

Any idea please?
this is a drupal installation
 
Last edited:

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
you can't pass query strings in cron jobs like that (the ?cron_key=abcdef part), just hardcode it in the script.

/usr/bin/php /home/hussam/public_html/cron.php >> /home/hussam/cron.log 2>&1
would be an appropriate line (script errors will get sent to a cron.log file in your home directory)
 
Last edited:

HussamT

New Member
Messages
23
Reaction score
0
Points
1
/usr/bin/php /home/hussam/public_html/cron.php >> /home/hussam/cronlog.txt logs the following:

Status: 503 Service Unavailable
X-Powered-By: PHP/5.2.17
Content-type: text/html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
<title>Site off-line | Drupal</title>
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?0" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?0" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?0" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/maintenance.css?0" />
<link type="text/css" rel="stylesheet" media="all" href="/themes/garland/style.css?0" />
<link type="text/css" rel="stylesheet" media="all" href="/themes/garland/minnelli/minnelli.css?0" />
<link type="text/css" rel="stylesheet" media="print" href="/themes/garland/print.css?0" />
<!--[if lt IE 7]>
<link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" /> <![endif]-->
</head>
<body>

<!-- Layout -->
<div id="header-region" class="clear-block"></div>

<div id="wrapper">
<div id="container" class="clear-block">

<div id="header">
<div id="logo-floater">
<h1><a href="/" title="Drupal"><img src="/themes/garland/minnelli/logo.png" alt="Drupal" id="logo" /><span>Drupal</span></a></h1> </div>

</div> <!-- /header -->


<div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
<h2>Site off-line</h2> <div class="clear-block">
<p>The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.</p><hr /><p><small>If you are the maintainer of this site, please check your database settings in the <code>settings.php</code> file and ensure that your hosting provider's database server is running. For more help, see the <a href="http://drupal.org/node/258">handbook</a>, or contact your hosting provider.</small></p><p><small>The <em>mysqli</em> error was: <em>Unable to use the MySQLi database because the MySQLi extension for PHP is not installed. Check your &lt;code&gt;php.ini&lt;/code&gt; to see how you can enable it.</em>.</small></p> </div>
<div id="footer"></div>
</div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->


</div> <!-- /container -->
</div>
<!-- /layout -->

</body>
</html>
so drupal's cron job isn't really running.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Try using wget instead:

Code:
wget -O -  http://YOURSITE/cron.php?cron_key=abcd >>/home/USERNAME/public_html/cron_log.txt 2>&1
 
Status
Not open for further replies.
Top