Cronjob inside folder Sources

Started by Jotade29, April 15, 2025, 09:35:52 PM

Previous topic - Next topic

Jotade29

SMF: 2.0.19
Hi, I've created a modification that modifies the user's XML download. I don't want to go into details, but from a panel, it allows me to have it appear when the user requests their personal data. When i accept it, a date is saved in the DB. After 48 hours, I want that approval to be automatically deleted. To do this, I thought about creating an event in phpmyadmin, but since my host is shared and I use cPanel, I have to use a cronjob...

My question is: can I use the SMF functions to connect to the database for that cronjob if i create the cronjob inside folder /Sources? And second, I will only access that cronjob through the CLI, that is, from the automatic call to that cronjob every 48 hours, which will open that PHP file, which I will save in the forum's source folder. Should I use if->!defined(SMF)...-> hacking attempt here, or should I use a different method to access it exclusively through the CLI?

Thnxx
Quote from: Diego Andrés on August 12, 2023, 02:20:18 AMI'm afraid convincing Jotade to upgrade to SMF 2.1 will require bigger effort than your work sanitizing Unicode characters  :laugh:

Advertisement: