Language Selection

English French German Italian Portuguese Spanish

Starting, Stopping, and Replacing Users' Cron Jobs

Filed under
HowTos

When performing system maintenance, we often disable certain users' cron jobs temporarily. When the maintenance activities are complete, the original crontab files are restored. To facilitate these tasks, we developed two Bourne shell scripts, stop_cron and start_cron. A related script, replace_cron, was developed to remove a user's current crontab file and replace it with the standard file for that user.

The syntax is similar for each script. The names of users whose crontab files will be affected may be supplied as operands. If no user names are specified on the command line, the list of users is read from standard input. To manipulate another user's crontab file, the scripts must execute with root permissions.

Each script depends on the SortingHat utility, which we discussed in our previous Sys Admin article (April, 2007). SortingHat provides the ability to back up the current version of a file and restore the backup copy -- exactly the type of thing we need to do with users' crontab files. If you don't want to install SortingHat, it should be easy to develop alternative implementations for stop_cron and start_cron. However, changing replace_cron might be more complicated, since the program relies on SortingHat to locate a standard crontab file.

Full Story.

More in Tux Machines

OpenSUSE 13.2 Beta

Migrating From Windows 7 To Ubuntu: The Ultimate Guide

Despite what all the Linux haters say, choosing Ubuntu is logical and migrating from Windows 7 to Ubuntu is a breeze. This article summarizes the process and provides solutions to some of the most common beginner hiccups. The Windows Vs Mac Vs Linux debate has been going on for years and doesn’t look to be settled anytime soon. If you are a Windows 7 user and still haven’t made the switch to Windows 8, you may want to consider migrating to Ubuntu 14.04, the latest Linux distro from Ubuntu. In addition to strong support from developers and a massive software repository, it’s free, faster and safer than Windows. Read more

7 killer open source monitoring tools

Network and system monitoring is a broad category. There are solutions that monitor for the proper operation of servers, network gear, and applications, and there are solutions that track the performance of those systems and devices, providing trending and analysis. Some tools will sound alarms and notifications when problems are detected, while others will even trigger actions to run when alarms sound. Here is a collection of open source solutions that aim to provide some or all of these capabilities. Read more

Reader Forum: Accelerating ‘IoT’ with an open-source, embedded platform for connected applications

Providing an end-to-end solution for building and deploying new connected applications extremely quickly, at scale, and at a fraction of the cost compared to conventional processes is key to streamlining M2M development. And, using an open-source, Linux-based platform, companies can run applications on any vendor’s hardware and use any cloud management platform. Read more