IBeeZz




  1. Ibizzi
  2. Ibeezey
Edit crontab for basic utilities in a business setting | 7 comments | Create New Account
Click here to return to the 'Edit crontab for basic utilities in a business setting' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Edit crontab for basic utilities in a business setting
  1. 37.7k Followers, 2,789 Following, 252 Posts - See Instagram photos and videos from Sad edits (@deepvibeezz).
  2. What are the best iBeezz alternatives? A list based on our research Puran Shutdown Timer, Shutdown Scheduler, Airytec Switch Off, ProfShutdown, Easy Shutdown, NPowerTray, and Ruler for Windows.

Without running a scheduler like iBeezz that will wake systems up and run specific jobs, sleeping systems will wake and run utils at the worst time for users - when they are trying to start work. So here's a sample crontab that changes the daily, weekly, and monthly jobs to run at a time when systems are (hopefully) not asleep (our builds wait.

Just to clarify, there are two 'crontabs':
1) The command line utility crontab, which is a tool to edit crontab files.
2) The system crontab file which is /etc/crontab
Apart from the system crontab file, each user has a crontab file, located in /var/cron/tabs.
These files are executed on schedule by the system daemon cron.
CronniX is not a replacement cron utility, it's merely tool to edit the crontab files.

Edit crontab for basic utilities in a business setting

The lines that read :
15 16 * * 4 root plutil -s ~/Library/Preferences/*.plist
30 16 * * 4 root plutil -s /Library/Preferences/*.plist
should be changed. The first line uses ~, which expands to /private/var/root, since this is being run by root - assuming you are trying to check your own Preferences you will want to replace this by ~username.
A more complete solution would be :
15 16 * * 4 root find /Library/Preferences /Users/*/Library/Preferences -name *.plist -exec plutil -s {} ;
This will check the local system's library as well as all local users' libraries for proper syntax of property lists.
To add root's library as well (which is probably not necessary, unless you are logging in to the console as root) :
15 16 * * 4 root find /Library/Preferences /Users/*/Library/Preferences /private/var/root/Library/Preferences -name *.plist -exec plutil -s {} ;

Edit crontab for basic utilities in a business setting

Thanks for the correction -- yes, having plutil check the '~/Library' doesn't do a whole lot of good since it fails to check any of the users' Preferences directories. The system crontab is being run as root while the computers are either showing the login screen, or logged-in as various non-Admin users.
What our local UNIX guru pointed out to me is that running the plutil in this fashion doesn't do much good, as any failures are not visible to the users and generate no reports.
He suggests that I have any failures trigger an AppleScript that removes the offending plist files. At the very least, errors need to call a dialog box up to let the user know that there is a damaged pref file at location: 'Users/xxxx/Library/Preferences/xxxx.plist'.

Edit crontab for basic utilities in a business setting

'The system crontab is being run as root while the computers are either showing the login screen, or logged-in as various non-Admin users.'
To be clear, the system crontab is *always* run as root -- even if an admin user is logged in.
'What our local UNIX guru pointed out to me is that running the plutil in this fashion doesn't do much good, as any failures are not visible to the users and generate no reports.'
Right. You can mail the results or even pipe them to a text file on a server or to a particular account's Desktop. This way an admin or the user, respectively, could check the outputs for problems.

Hmm, usually, any output from scripts run by cron should be automatically mailed to the owner of the crontab (or the one specified in MAILTO in the crontab).

anacron, cron helper for boxes that do not run 24/7

A better way than to guess the time a box will be running is to install anacron. It will check if a cron script has run or if the box was turned off at this time.
It can do this delayed on system startup. Also you can always use 'nice' to give the cronjobs a lower priority so they don't trash the system too much.
BTW: The remark about freeware is kind of strange, if you consider the nature of Darwin, Apache, Samba etc.

Edit crontab for basic utilities in a business setting

1. Freeware or shareware is often discouraged.
Umm ... Cron (and crontab) is freeware! I know you paid for the copy you got in OSX, and that's cool - I did too. Still, rather funny to see this in an article about crontab :)
Understand you're talking about Cronnix here, but really both apps are free; the difference is that one came to you on an Apple CD and is vendor supported, and the other is a third-party download.
Am I being too picky here? I guess this really meant, 'Third-party freeware/shareware is discouraged.'

Panther’s Exposé is one of the best operating-system features I’ve seen in years. But you need to press function keys to invoke Exposé functions, and on most Apple laptops, OS X claims keys F1 through F7 for controlling system settings such as brightness and volume. With certain newer PowerBooks, the added controls for keyboard backlighting mean that every function key except F11 and F12 is already in use. To use these keys as function keys, you must hold down the fn modifier key, and unless you have the hands of Julius Erving, this can be pretty tough to do with one hand.

Enter the open-source fnSwitch 1.1.1 ( ; http://sourceforge.net/projects/fnswitch/ ), which does just what its name implies. After you install fnSwitch and enable the Activate F1-F12 Keys option in its preference pane, your function keys will work as function keys when you press them; if you want to use them to change system settings, you hold down the fn key.

fnSwitch isn’t useful just for Exposé; it also frees up function keys when you use a keyboard utility to assign items and actions to those keys. My only complaint is that fnSwitch doesn’t provide its own keyboard command for toggling its functionality on and off, but that’s a minor beef.

More Keyboard Controls

Speaking of keyboard switches, if fnSwitch doesn’t do enough for you, check out gnufoo’s open-source uControl ( ; http://gnufoo.org/ucontrol/ ). In addition to letting you toggle function-key behavior, it provides a number of other keyboard modifications, some of which Mac users have been requesting for years.

For example, you can swap one modifier key for another — switching the enter and option keys is popular with PowerBook users. If you’re left-handed and want to reverse the buttons on your two-button mouse, you can do that, too. You can also enable mouse or trackpad scrolling — press a desired modifier key (such as the fn key on PowerBooks), and you can scroll the current document window by moving the cursor. uControl is also handy for Mac users who want to use a Windows-centric keyboard — you can set up the Alt and Windows keys to correspond to the option and 1 keys.

IBeeZz

Since uControl is a kernel extension, make sure to install the version that’s correct for your version of OS X, and check for upgrades before you update your operating system. But if you get hooked on uControl’s functionality, these will be minor inconveniences.

Movie Management

Netflix (www.netflix.com) lets you rent a number of DVDs at once — and keep them as long as you like — via the U.S. Postal Service. If you’re a Netflix subscriber, you’ve got to check out The Little App Factory’s $10 Netflix Freak 1.0.3 ( ; www.thelittleappfactory.com ). Using Netflix Freak, you can manage your queue (the list of movies you’ve ordered for rental) and access the online Netflix database far better than you can through the Netflix Web site.

IBeeZz

The main Netflix Freak window shows your queue; you can rearrange movies — which changes the order in which you’ll receive them — by dragging them up or down in the list. You can add some mystery to your movie-watching by clicking on the Shuffle button to reorder your queue; you won’t know which movie you’ll get next. You can also search your queue to see if you’ve already added a title. (I know someone who has 500 movies– the maximum — in a queue, so this feature can really be helpful!) Clicking on a title provides information about that movie, including an image of its DVD cover, a synopsis, and its genre (which you can change if you have your own classifications). You can include your own notes about each movie and search the Notes field later.

IBeeZz

Another helpful feature in a family environment is the ability to assign a name to each movie, in order to keep track of who rented each one.

Netflix Freak’s Find screen offers improved movie-search features, dividing search results into Movies, Actors, and Directors. Click on a movie to get more information (including Netflix user ratings), or click on an actor or director to get a list of movies related to that person. Select a movie and click on Add to add it to your queue — you can choose to add it to the beginning, add it to the end, or put it in and then shuffle the entire queue. If only the Web site offered such flexibility!

Netflix Freak lets you quickly see currently checked-out movies, along with your entire rental history. This little utility is a welcome alternative to the Netflix Web site, which I haven’t visited in months.

Installer Info

Have you ever wondered exactly what an installer package (a .pkg or .mpkg file) was going to install? Or have you wished you could install just a single file or subset of files from such a package? If so, CharlesSoft’s $20 Pacifist 1.6 ( ; www.charlessoft.com ) is just what you’ve been looking for. Drag an installer package onto the Pacifist icon, and Pacifist presents you with a list of all the files in the package, organized by the target installation directory. You can also see detailed information about each file, including its permissions, size, and file type. This functionality alone can be very helpful for previewing installations.

But Pacifist’s real power is that it lets you verify installations and extract or install any file from within a package. For example, if you recently updated OS X via an installer package, and now you’re having problems, open that package in Pacifist and click on the Verify button. Pacifist will check to see whether all files are installed correctly and have the right permissions, and it will provide a full report of the results. Discrepancies may indicate an installation problem, and reinstalling might fix it.

Ibeezey

If you discover that an application or a file is damaged, you can also use Pacifist to get a clean copy of that file. Open the appropriate installer package in Pacifist, and then select the desired file(s). Click on Extract to save the file(s) to your hard drive (in a location you choose), or click on Install to install those files exactly as if you were using the Installer utility.

Ibizzi

Note that because it’s so powerful, Pacifist can be dangerous; installing a wrong or incomplete version of a vital system file can render your system unbootable. And if you need to reinstall an application, you should install the full application first, and then install any updates. But Pacifist is one of the most useful tools available for OS X, especially for troubleshooting.

Enhanced Energy Saver

In Panther, Apple finally brought back OS 9’s scheduled-startup, sleep, and shutdown features. But Panther still limits you to only two schedules: one for startup, and another for either sleep or shutdown. If you’d like more control over these functions, you’ll love iBeeZz 2.2.1 ( ; www.ibeezz.com; see the company’s Web site for pricing information).

Ibeezey

With iBeeZz, you can create as many scheduled events as you like, and you can schedule each event for a specific time on one or more days each week. However, iBeeZz doesn’t confine you to startup and shutdown; each event can execute one of five basic actions — startup, wake from sleep, restart, shutdown, and sleep — or one of two special options that let you open files or start playing music via iTunes.

The Open Files option lets you select one or more applications and files– including AppleScripts — to open at the scheduled time. The iTunes option lets you play songs from your main Library or choose a particular playlist; you can also choose the target volume and fade-in speed, making iBeeZz a great alarm clock. iBeeZz gives you precise control over exactly when your computer is running and what it’s doing.