Cron utility in Linux is used for scheduling tasks that can be run at specified time intervals.
The structure of a typical cron job is:
So, for example, to display the system uptime daily at 11 pm, the cron job would be
However, configuring cron jobs in Linux can be somewhat tedious because of its structure and troubleshooting them even more so.
(It can be useful to get familiar with Linux command line basics before trying to use cron.)
So these types of tasks can be simplified using an online Cron generator.
To do this, go to Crontab Generator.
It will have various options for scheduling. Simply select when and what commands need to be included in configuring cron.
So, for example, a cron job that will display all logged in users every 30 minutes daily can be setup. This can be directly emailed too if needed.
Choose the required options and click Generate Crontab Line. It will generate the cron configuration.
Now copy paste it in Linux cron editor using:
Save the changes.
The cron job will now be active and email the output as per schedule.
Also, to check for any existing cron jobs:
To remove any existing cron jobs:
Happy scheduling.