Cron Job
To ensure that expired short links are cleaned up from the JSON file in ShrtUrl, a cron job needs to be set up to run the cron.php file once a day. Follow the steps below to set up the cron job:
Log in to the ShrtUrl admin panel using your admin credentials.
Click on the "Cron Job" link in the navigation bar to access the Cron Job page.
Here, you can view the command that should be used for the cron job. An example command is:
0 0 * * * php /path/to/shrturl/class/cron.php > /dev/null 2>&1
Copy this command.
Use the command to set up a cron job on your web hosting control panel to run cron.php every day at midnight.
Log in to your web hosting control panel.
Navigate to the "Cron Jobs" or "Scheduled Tasks" section.
Click on "Add New Cron Job" or "Create New Scheduled Task".
Paste the command you copied earlier.
Click on the "Save" or "Add" button to create the cron job.
Once these steps are completed, the cron.php file will be run automatically every day at midnight, and expired short links will be removed from the JSON file.
Last updated