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

Quadcopter drone packs first all-Linux APM autopilot

Erle Robotics launched a ROS-enabled, open source “Erle-brain” autopilot that runs APM directly on Linux. The device also powers an “Erle-copter” drone. Over the last year, Spanish firm Erle Robotics S.L. has been working with 3DRobotics to develop an open source BeaglePilot autopilot for drones that can run Linux on 3DR’s popular, Arduino-based APM (ArduPilot Mega) platform. The APM Linux port was developed by both companies, as well as several academic institutions. The BeagleBone-based “Erle-brain” autopilot is built into the $490-and-up Erle-copter quadcopter. Read more

Seven Tips To Get The Most From Your New Android Smartphone

With applications able to run in the background and sync as they see fit, Android can rapidly eat through your cellular data allowance if you are not careful. While it’s fine to let the data run free on wi-fi, you’ll want to restrict your data usage when out and about. Short of switching off mobile data (which defeats the purpose of a smartphone), look under the options in the Data Usage part of the settings. Here you’ll find my wallet’s favourite Android setting of ‘restrict background data’. Now when using cellular data, apps will only pull down data when they are in the foreground and you can see them doing so. If a smartphone is all about being in control, this is the option that gives you confidence. Read more

today's leftovers

Hands-on with PCLinuxOS: A terrific release

I had been thinking that a new PCLinuxOS release was due any time now, based on their quarterly release schedule. Sure enough, it has now arrived, just in time for Christmas - PCLinuxOS 2014.12. Read more Also: Santa Claus has Linux in his sack -- PCLinuxOS 2014.12 is here PCLinuxOS 2014.12 released