Cron vs Anacron – Different Ways of Scheduling Jobs on Linux
Learn the differences between cron and anacron jobs, how each one works, the syntax used to set scheduled jobs and real world examples.
Stop Cron Daemon from Sending Email for Each Job
When the Linux crond runs a scheduled job, it typically sends an email to root when the job is complete. It uses the MAILTO variable that is set in /etc/crontab to determine who receives this mail. By default this is set to “root”, so the…
How to Run a Cron Job Every 30 Seconds
Q: I have a simple one line script that uploads a photo taken by my webcam to a remote server (/sbin/runuser -l myuser -c ‘scp /var/ftp/pub/snap/20131209-232415.jpg [email protected]:www/cam/home.jpg). How can I run this as a cron job every 30 seconds? A: This can be done, but…
Create iptables Rules Based on Hostname Using IP Sets
Learn how to use IP Sets and a simple Bash script to update your iptables rules based on a clients hostname or domain name instead of IP address.
NMap – A Basic Security Audit of Exposed Ports and Services
Learn how to use NMap to do basic scans for open ports. Use additional NMap vulnerability scanning scripts for important security audits.
Using systemd Path Units to Monitor Files and Directories
Use systemd path units to monitor files and directories and set service units to execute custom scripts when changes are observed.