Implementing Cron-Based Scheduled Tasks in Spring
Cron Expression Syntax
A cron expression is a string that defines the schedule for task execution. It consists of 6 or 7 fields separated by spaces:
Field
Allowed Values
Special Characters
Second
0-59
, - * /
Minute
0-59
, - * /
Hour
0-23
, - * /
Day of Month
1-31
, - * / ? L W
Month
1-12 or JAN-DEC
, - * /
Day of Week
1-7 or S ...
Posted on Fri, 04 Sep 2026 16:44:56 +0000 by austar
Automating MySQL Backups on Ubuntu Systems
Creating Backup Directories
Begin by establishing a dedicated directory for backups:
mkdir -p /home/apps/backup/mysqllive
Securing Database Credentials
For enhanced security, store database credentials in a configuration file instead of embedding them in scripts.
Create and edit the MySQL dump configuration file:
sudo vim /etc/mysql/conf.d/mys ...
Posted on Thu, 03 Sep 2026 16:54:06 +0000 by FireDrake
Linux File Operations, Remote Sync, and Automated Backups with cron and tar
1. Locating Files with find
# Search every directory for a file called nginx.conf
find / -type f -name nginx.conf
# Limit the search to /etc for faster results
find /etc -type f -name nginx.conf
# Wildcards: list every .conf file under /etc
find /etc -type f -name "*.conf"
# Combine wildcard and prefix
find /etc -type f -name " ...
Posted on Sun, 16 Aug 2026 16:24:15 +0000 by BrandonRoy
GitLab Backup and Restoration Guide
Automtaed GitLab Backups Using Cron
To automate GitLab backups, you can use cron jobs to execute backup scripts at scheduled intervals.
Schedule a Daily Backup
Edit the crontab file:
crontab -e
Add the following line to run a backup script daily at 2 AM:
0 2 * * * /opt/scripts/gitlab_backup.sh
Backup Script Content
The script should include c ...
Posted on Tue, 30 Jun 2026 18:18:25 +0000 by carleyvibe
Understanding Cron Expression Syntax
Simple string combinations can produce remarkable results. This holds true for regular expressions and the cron scheduling system alike. Both appear deceptively straightforward, yet improper usage can lead to amusing—or disastrous—outcomes. For instance, I once attempted to schedule a task to run every four hours and wrote the following express ...
Posted on Sun, 31 May 2026 22:07:12 +0000 by nikneven
CentOS 7 Cron Task Setup Guide
On CentOS systems, cron is the go-to utility for scheduling recurring tasks, though three scheduling tools exist for different use cases:
at One-time execution only; requires the atd backend daemon to run
cronie/crontab Recurring task execution; requires the crond daemon, with tasks managed via crontab
anacron Daily-based schedulin ...
Posted on Wed, 20 May 2026 00:10:13 +0000 by Vertical3
Mastering Job Scheduling with Crontab on Linux
Crontab enables users to schedule commands or scripts at predefined itnervals—minutes, hours, days, months, or weekdays. It is widely used for tasks like log rotation, backups, and system maintenance.
Before using crontab, ensure the cron daemon is running:
systemctl start cron # Start the service
systemctl enable cron # Enable at ...
Posted on Fri, 15 May 2026 10:36:38 +0000 by Tensing
CentOS System Administration: Common Configuration Tasks
Setting Up YUM Repository
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
sudo yum makecache
Initial Configuration ...
Posted on Sun, 10 May 2026 04:38:23 +0000 by JukEboX