Adding new cron job for automated processing on every 10 minutes on Centos 6.7

CK CK 3788 
Created at
Updated at  
1,332 0 0

The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals. The origin of the name cron is unclear; it has been suggested that it comes from the Greek word for time, χρόνος chronos, or that it is an acronym for "Command Run On Notice" or for "Commands Run Over Night"

You can simply add cron job in root account:

# crontab –e

And you will see the editor such as vi, and you can simply add jobs as following:

*/10 * * * * root /etc/cron.10min/*.cron

In order to work aboves, you should create folder as following:

# mkdir /etc/cron.10min

The followings are the example of cron jobs which is saved as /etc/cron.10min/0abacron

#!/bin/bash 
# Skip excecution unless the date has changed from the previous run 
if test -r /var/spool/anacron/cron.daily; then 
    day=`cat /var/spool/anacron/cron.daily` 
fi 
if [ `date +%Y%m%d` = "$day" ]; then 
    exit 0; 
fi

# Skip excecution unless AC powered 
if test -x /usr/bin/on_ac_power; then 
    /usr/bin/on_ac_power &> /dev/null 
    if test $? -eq 1; then 
    exit 0 
    fi 
fi 
/usr/sbin/anacron -s
Tags Centos anacron crontab db autorepair Facebook X
Comments 0
Similar posts
  1. Setup Apache+PHP+MySQL on Centos 6.7
    605
  2. mcrypt missing when using phpMyAdmin on Centos 6.7
    550
  3. Set timezone and time on Centos 6.7
    541
  4. Configuring IP Address on Centos 6.7
    790
  5. How to mount windows shared folder on Centos 6.8 - mount error 12 = Cannot allocate memory to the mount.cifs(8)
    913
  6. How to optimize MySQL automatically in CentOS Linux
    1,008
  7. Generate Let’s Encrypt Wildcard SSL Certificate
    626
  8. Upgrading to GCC 4.9.4 in CentOS 7 requires installing a newer version manually
    583
  1. Why SPF and DKIM Are Essential for Linux Email Servers?
    36
  2. Force no caching in Apache by modifying the .htaccess file using appropriate headers
    2,676
  3. Beyond your conventional memory size with swap file instead of a partition
    1,143
  4. Gmail requires all senders to authenticate with either SPF or DKIM.
    681
  5. Bash script to install postfix and sasl for sending email
    1,197
  6. Guide for tmux shortcuts - split current pane, toggle pane
    1,304
  7. Tistory remote blogging example based in CLI & PHP
    2,725
  8. Preventing Unauthorized Image Crawling by Bots: A Clever Discovery and How to Address It
    1,728
  9. Network diagnostic tool for IPv4/IPv6 - traceroute/traceroute6
    1,919
  10. chmod by type (directory and file permission)
    734
  11. Check network port is open or not on CentOS 7
    1,189
  12. Change MySQL port number for security purpose
    815
  13. CentOS warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory on CentOS 7
    1,073
  14. Set up an SMTP server on CentOS 7
    727
  15. File conversion to UTF in Schell Script
    1,024
  16. Server status checking by Shell Script
    1,516
  17. How can I increase MySQL max connections?
    461
Recently updated
  1. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    42
  2. How do I create animated background for Google Meet?
    21,004
  3. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    251
  4. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    94
  5. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    157
  6. Array of arguments passed to script in PHP
    90
  7. Invalid Auction Storms in Ad Tech
    98
  8. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    202
  9. The Two Clocks of Ad Server Architecture
    70
  10. Frequency Cap Architecture Overview
    515
  11. Collecting Proof-of-Play from 100,000 Screens
    146
  12. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    288
  13. What is RedisVL?
    109
  14. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    231
  15. TPU & GPU Cluster Management Tools
    245
  16. The Concept of Scaffolding in AI Agents
    234
  17. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    583
  18. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    259
  19. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    339
  20. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    202
  21. Machine Learning: Training vs. Ranking
    222
  22. The Continuous Learning Machine: Designing a Loop That Actually Turns
    222
  23. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    195
  24. Designing a Data Curation System Around a Vector Database
    221
  25. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    256
  26. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    656
  27. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    196
  28. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    219
  29. Understanding Data Lineage
    262
  30. System Requirements and Architecture: Intelligent Priority-Based Scheduler
    167