I'm trying to run a php file to store some set of values in database for every minute through cron job.
Here is my code to store the values in database:
store.php
<?php
$db = mysqli_connect('localhost','root','pass','sample') or die ('not connected');
$result = $db->query("insert into emaillist (email,fname,lname) values('ganesh@gmail.com','rathina','ganesh')");
?>
Normally the script ll run and the values ll be stored in the database.
but I need to store the values through cron jobs:
For crontab I created like this:
01 * * * * /usr/bin/php php -f /var/www/cronjob/store.php
But the file is not running.
What is the mistake I have done or what I have to do to run the file in crontab.