Skip to main content

Posts

Showing posts from April, 2019

Things you need to know about cron

cron is a Linux utility which schedules a command or script on your server to run automatically at a  specified  time and date.  They're most commonly used for automating system maintenance or administration. However, they are also relevant to web application development.   Why use cron?  Server admins have been using cron jobs for a long time.   You can expire and erase cached data files in a certain interval. You can auto-check your website content for broken links and have a report e-mailed to yourself regularly. Can update your database from external api  Syntax Here is a simple cron job: 1 10 * * * * /usr/bin/php /www/virtual/username/cron.php > /dev/null 2>&1 It consists of five parts: minute hour day of month month day of week Can generate the sequence from  crontab guru ,    https://crontab.guru/every-30-minutes Editing the Crontab Running this command wil...