Language Selection

English French German Italian Portuguese Spanish

Starting, Stopping, and Replacing Users' Cron Jobs

Filed under

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

6 Best Linux Desktop Environments [Part - 2]

Linux has been developing at a good pace through this last years and with development comes better support for different hardware regarding support for proprietary drivers for video cards, better file systems, more choices in what operating system to use and one of the things that has it importance is distros graphical environment. Read

OpenStack in the Headlines

  • OpenStack Adoption and Revenues on the Rise
    One thing you can count on at the semiannual OpenStack Summits are new studies and reports about OpenStack. And that's the case at the OpenStack Summit going on in Barcelona, Spain, now through Oct. 28. A number of studies are being discussed at the event, including the October 2016 OpenStack User Survey and new analysis on the state of OpenStack from analyst firm 451 Group. According to the 451 Group, the OpenStack software market will generate $1.8 billion in revenue in 2016 and grow to $5.7 billion by 2020. The firm is forecasting that the five-year compound annual growth rate for OpenStack from 2015 through 2020 will be 35 percent. The semiannual OpenStack User Survey is also a topic of discussion at the OpenStack Summit, providing insight into the state of OpenStack deployment. Among the high-level findings is that 71 percent of OpenStack clouds are now in production and fully operational, up from 59 percent in 2015. Also of note is how well-regarded the Kubernetes orchestration system has become, outpacing CloudFoundry in terms of user interest. In this slide show, eWEEK takes a look at some of the highlights of the latest OpenStack research studies.
  • ​HPE backs off from OpenStack development
    HPE still supports OpenStack in its Helion cloud program, but it's cutting way back on how much it's spending on helping create OpenStack.
  • Is OpenStack Cloud Interoperability a Myth?
    Boris Renski, co-founder of Mirantis, argues that interoperability doesn't start at the infrastructure layer. It starts with applications, he said. BARCELONA—A keynote highlight on Oct. 26 at the OpenStack Summit here was a live, onstage demonstration with 16 OpenStack vendors, all showing a degree of interoperability. The demonstration was part of an interoperability challenge, though, according to Boris Renski, co-founder of Mirantis and member of the OpenStack board of directors, the infrastructure layer is not necessarily the right place to emphasize interoperability.
  • Communications Leaders Choose Red Hat OpenStack Platform for Powering Cloud Deployments to Deliver New Services

Games for GNU/Linux