In this guide, we will be diving into what is a cron job and crontab. We example what the cron is why you would want to use it. There is also a calculator you can use to generate a crontab entry.
Those of you that use Webmin already have something very similar to this in the System > Scheduled Cron Jobs tab, but for those who aren’t using Webmin, there’s this:
If you want to periodically perform a task (e.g. sending Emails, backing up database, doing regular maintenance, etc.) at specified times and dates, there are two ways to set scheduled tasks:
- Method 1: Use our online cron job service that will save you a headache.
- Method 2: Use Cron available in Unix/Linux systems.
If you go with method 2, the following generator can help you produce a crontab syntax that you can copy & paste to your crontab file (You can open the file by using command
crontab –e). Below the generated crontab syntax, a list of run times will be displayed too. The predictions will help you ensure that you set the time and date right.
Link to full page:
For those who are familiar with the Unix system, you will also be familiar with the cron application that allows you to schedule and automate tasks to run on their own. We even have tutorials that show you how to get started with cron and crontabs. However, cron is not perfect, as it requires your system to be running 24 hours a day. If you have a habit of turning off your computer at night, and a cron job is scheduled in the sleeping hours, the task won’t be executed. Luckily, there are several cron alternatives that can do a better job than cron. Let’s check them out.
Full article here:
4 Useful Cron Alternatives For Linux (Make Tech Easier)
Linux crontab FAQ: How do I edit my Unix/Linux crontab file?
I was working with an experienced Linux sysadmin a few days ago, and when we needed to make a change to the root user crontab file, I was really surprised to watch him cd to the root user’s cron folder, make changes to the file, then do a
kill -HUPon the crontab process.
Thinking he knew something I didn’t know, I asked him why he did all of that work instead of just entering this:crontab -e
Full article here:
Edit your crontab file with crontab -e (Alvin Alexander)