Hi is it possible for anyone to provide a code to add to cron.pl so the cron checks the last x day for example i dont want any unverified transactions which is over 20 days old and cron will execute the code everytime it starts.
you could also update the new version with the code if anyone or you provide it.
XFileSharing Pro - delete old unverified transactions using cron
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
In cron.pl find:
and add below:
Code: Select all
# Delete old reports
Code: Select all
$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY");
i would say thanks bu you just made my problem worse as it deleted every report older than 20 days not older than 20 and not sprovedPilgrimX182 wrote:In cron.pl find:and add below:Code: Select all
# Delete old reports
Code: Select all
$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY");
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
lol, sorry bout this Too hot here today.
Here goes correct one:
Here goes correct one:
Code: Select all
$db->Exec("DELETE FROM Transactions WHERE created<NOW() - INTERVAL 20 DAY AND verified=0");