I'm using single file to put it as cron in my system. The main idea of doing that is to prevent the cron working 24/7.
I have these lines in my file
if(isActivePlugin('plugin', 'first_plugin')) {
if($expire_one <= $time) {
$db->query("UPDATE table SET column='0'");
$db->query("UPDATE table_2 SET column='0' WHERE column='1'");
exit();
}
}
if(isActivePlugin('plugin', 'second_plugin')) {
if($expire_twoo <= $time) {
$db->query("UPDATE table SET column='0'");
$db->query("UPDATE table_3 SET column='0' WHERE column='1'");
exit();
}
}
But the second one never works and does not check & update the database. Even if I remove the plugin check it still doesn't work.