I am currently reading this documentation here where I want to use CRON. Now the first section says that I need to enter the command: crontab -e .
I only need to enter this into a simple text editor and just upload the file to the server?
I use helios.hud.ac.uk, so this will 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('dm-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(); ?>
URL for this php script: helios.hud.ac.uk/u00000000/Mobile/inactivatesession.php
I haven't used CRON before, so I just don't need help.
thanks
source share