• Mac OS X,  Mac OS X Server,  Ubuntu,  Unix

    Creating a crontab

    Creating your first crontab job is a three-part process: Prepare the absolute path to the program or script that you want to run Create a text file containing a line to schedule the job as described above for crontab fields Upload the text file to your system cron When preparing program to run or creating scripts to run remember that crontab jobs are background tasks. There is no terminal attached to a crontab job so there should be no print statements that normally write to the screen. (It is possible to redirect such print statements.) The same consideration hold true for requesting user input. Let’s assume that we want to…

  • Mac OS X,  Mac OS X Server,  Unix

    The basics of cron

     The cron command has officially been deprecated in Mac OS X, but still functions if called upon. cron starts a process that executes commands at specified dates and times. Regularly scheduled commands can be specified according to instructions found in the crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab files via the crontab command.  Crontab copies the specified file or standard input if no file is specified, into a directory that holds all users’ crontabs.  crontab options: The -e option edits a copy of the current users’ crontab file or creates an empty file to edit if crontab does not exist. The-r option removes a user’s…