CloudInsidr

Cyber security, infotech

  • Subscribe!
  • Privacy Policy
  • Legal
  • Contact Us

Join us on Twitter: @CloudInsidr

  • news & alerts
    • events
    • industry analysis
    • industry gossip
    • people
  • cloud, edge & co.
    • AWS
    • administration & orchestration
      • web servers in the cloud
      • mail servers
      • databases
  • cybersec & warfare
    • encryption
  • blockchain
Home cloud, edge and everything in between administration and orchestration It’s never too late: cron 101
It’s never too late: cron 101

Cloud Insidr 2019-07-23 Leave a Comment

It’s never too late: cron 101

Good ol’ fashioned cron can greatly simplify system maintenance.

A note on system logs: in Linux distributions of the IBM Red Hat family, including Fedora and CentOS, system logs end up NOT in

/etc/syslog.conf

but in:

/etc/rsyslog.conf

instead.

Install cron

Install cron using:

yum -y install vixie-cron crontabs

Make sure the daemon will be switched on after reboot:

/sbin/chkconfig crond on

Start the cron daemon:

/sbin/service crond start

Edit cron jobs

To edit crontab, the command

crontab -e

should suffice. If not, you may want to try editing the file directly:

nano /etc/crontab

Set a default editor for crontab

Set a default editor for your cron jobs:

export EDITOR=/usr/bin/nano

Run cron jobs manually

You can try running select cronjobs right away:

run-parts /etc/cron.monthly

Should that fail, set your cron job in question for a couple of minutes from the current date and time and see if you can catch any errors this way.

Verify the resulting output in the logs:

tail /var/log/cron

tail /var/log/messages

If not sure about your instance’s time and date, enter:

date

Filed Under: administration and orchestration, Linux, tips and tricks Tagged With: automation, cron

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe

SSL/TLS Certificate Square (250 x 250)

Pearson Education (InformIT)

SSL/TLS Certificate Medium Rectangle (300 x 250)

©2022 CybrAnalytiqa OÜ

  • Content purchasing and syndication