cron – recurring scheduler
Runs commands at specified times repeatedly (daily, weekly, monthly, every 5 minutes, etc.).
Solaris · Lesson
Solaris · Lesson 25
cron is used for recurring scheduled jobs; at is used for one-time jobs at a specific time. In this lesson, you'll learn when to use which, how to write crontab entries, and how to control which users are allowed to schedule jobs.
solarisLessons.js.In Solaris, cron and at are classic scheduling tools:
Runs commands at specified times repeatedly (daily, weekly, monthly, every 5 minutes, etc.).
Runs a command once at a particular date/time (e.g. tonight 23:00, tomorrow 06:00).
Use cron for recurring jobs, at for one-time jobs at a specific time.
Each line has 5 time fields + command. Order: minute, hour, day-of-month, month, day-of-week, then command.
Each user has their own crontab file stored in /var/spool/cron/crontabs.
Root (or privileged) can manage crontab for other users with -u.
Use cron.allow / cron.deny to control which users can use cron.
at uses similar allow/deny files, but for one-time jobs.
at accepts natural time expressions like now + 10 minutes, 08:00, midnight, tomorrow etc.
Use atq to list jobs and atrm to remove them.
/etc/cron.d/cron.allow and /etc/cron.d/cron.deny to control cron use./etc/cron.d/at.allow and /etc/cron.d/at.deny to control at use./usr/bin/find instead of find).>> logfile 2>&1 so you can debug failures later.