0

I want to add a cron job that runs hourly and it edits information in my SQL database.

addOne.php

<?php
$connection=new pdo('mysql:host=HOST;dbname=DATABASE','ROOT','PASS');
$prepare=$connection->prepare('update TABLE set COLUMN=COLUMN+?');
$prepare->execute([1]);
?>

enter image description here

Will cron.hourly run php files?

I test cron.hourly with

run-parts -v /etc/cron.hourly

But nothing happens.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.