cron job have risk ,best don't use this to do something ,you can find better in link https://developers.whmcs.com/advanced/db-interaction/ ,or cron job have risk.create new file name delwhmcs.php in your cronjob folder and paste this code
PHP:<?php // change your directory include_once('/your/home/directory/to/configuration.php'); $conn = mysqli_connect($db_host, $db_username, $db_password, $db_name); if(! $conn ) { die('Could not connect: ' . mysqli_connect_error()); } $sql = "DELETE FROM tblconfiguration WHERE setting='vultr_vps_localkey'"; if(mysqli_query($conn, $sql)){ echo "Records were deleted successfully."; } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn); } // Close connection mysqli_close($conn); die;
then create cronjob for run every day and use this codePython:php -q /your/home/directory/to/your/folder/delwhmcs.php
I don't know what happened to you, but the patch updates the key automatically