I need to implement a cron job which run everyday at 8:00 AM.I don't have any idea what needs to be done. the cron should run the a function greet() on this file.
<?php
class Person {
public $age=0;
public $isalive=false;
public $name;
public $msg;
public $isAlive=true;
public $firstname;
public $lastname;
public function __construct($fname,$lname,$age){
$this->firstname=$fname;
$this->lastname=$lname;
$this->age=$age;
$this->name=$fname." ".$lname;
//$this->isAlive=$isAlive;
}
public function greet(){
echo "$this->name says $this->msg my age is $this->age <br> am I alive:$this->isAlive";
}
}
$teacher = new Person('boring','12345',12345);
$student = new Person('Swapnil','Shende',24);
echo $student->age;
?>