How to run crontab-e?

Posted by user1723760 on Stack Overflow See other posts from Stack Overflow or by user1723760
Published on 2012-10-24T22:52:30Z Indexed on 2012/10/24 23:00 UTC
Read the original article Hit count: 341

Filed under:
|

I am currently reading this documentation here where I want to use CRON. Now it says in the first section that I need to enter in a command: crontab -e.

Do I only need to enter this in a simple text editor file and just upload the file into the server?

I am using helios.hud.ac.uk so would this be the correct command:

* * 25 10 * helios.hud.ac.uk/u00000000/Mobile/inactivatesession.php

This will execute this php script below (inactivatesession.php):

<?php

include('connect.php');


$createDate = mktime(0,0,0,10,25,date("Y"));
$selectedDate =  date('d-m-Y', ($createDate));

$sql = "UPDATE Session SET Active = ? WHERE DATE_FORMAT(SessionDate,'%Y-%m-%d' ) <= ?";                                         
$update = $mysqli->prepare($sql);
$update->bind_param("is", 0, $selectedDate);
$update->execute();

?>

The url for this php script is: helios.hud.ac.uk/u00000000/Mobile/inactivatesession.php

I havn't used CRON before so just need little help on it.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about cron