What is Cron Jobs?

Cron Job is a standard Linux feature that allows you to schedule tasks, called “Cron Jobs” to unattended at a specific frequency. A Cron Jobs is a Linux Command for scheduling a task to be executed sometime in the future. This is normally used to schedule a job that is executed periodically. Here you will see, how to check the Cron Job via server log.

Cron allows Linux users to run commands or scripts at a given date and time. It typically automates system administration. Cron is the most powerful tool in Linux. Cron wakes up every minute and checks schedule tasks in Cron table. It is usually used for system administration jobs such as backups or cleaning /tmp/ directories and more.

The cron service runs in background and constantly check /etc/crontab file and /etc/cron.*/ directories. It also checks the /var/spool/cron/ directory.

How to check the Cron job via server log?

You can see the Cron job logs in the server by following the below steps.

By default, all the logs including Cron logs are stored in /var/log/syslog directory. To see the Cron logs in a manual way you need to navigate to this directory and search for the Cron job-related logs. The below method will bring you to the Cron logs in an easy manner, Before using this commands make sure that you have privileged with SSH access.

grep "cronscript.php"/var/log/cron command is used to check Cron job via server log.

Categorized in: