Setting up cron jobs for regular tasks

Usually, websites have some management tasks to perform in the background on a regular interval, such as once a week, once a day, or every hour. This can be achieved by using scheduled tasks, commonly known as cron jobs. These are scripts that run on the server after the specified period of time. In this recipe, we will create two cron jobs: one to clear sessions from the database and another to back up the database data. Both will be run every night.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158