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

Linux Remote Desktop Roundup

Over the years I've found that a significant hurdle to getting family and friends to switch to Linux comes from its lack of familiarity. This is especially true when it comes to troubleshooting any issues. Obviously, when a malfunction occurs it's not always possible to be there in person. However thanks to the wonders of broadband Internet and advanced software, we're now able to do the next best thing. In this article, I'll share some recommended remote desktop software for Linux. I’ll explore both open source and closed source solutions. Read more

Android ski goggles offer augmented reality display

It runs Android on a 1.2GHz ARM CPU, and offers hands-free control. Read more

Photoshop competitor Krita is a true creative tool -- and it's free and open source

Open source has some of the greatest tools, which continues to prove that you don't have to lock-down the code behind guarded walls to make a better product. Some popular open source products that don't have any match in the closed source world include Firefox, Chromium, VLC, Blender, Android, one gem that is, surprisingly, less known but extremely powerful when it comes to creating a work of art. Read more

First peek at the next Ubuntu 15.04 nester line-up

Ubuntu 15.04 is here – almost. The first beta of Vivid Vervet has been delivered, and with it have come images of the penguin flock that nestles on this OS. I looked at Xubuntu, Kubuntu, Ubuntu GNOME and Ubuntu MATE but there’s also Lubuntu and the China-centric Ubuntu Kylin, which I didn’t test. These are beta releases and should be considered for testing purposes only, but the advantage of these early versions is that features have been frozen and you can get an early glimpse of what's coming for each of the popular flavours in the 15.04 foundation. From this point on, the only changes will be bug fixes. Read more