'at' as an alternative to 'cron'

At Sun, we can logon to SunRay servers, which is Solaris10, but us mere mortal employees are not given 'crontab' privelege.

I have a task which I run everyday at 3PM and I have been running it in a terminal interactively every day. Today, I learned that I was very stupid... Even the 'man' page says 'at' can be an alternative to crontab.
$ man at 2>/dev/null | ggrep -B 4 -A 6 crontab
     Example 3: Self-rescheduling a Job

     To have a job reschedule itself,  at  can  be  invoked  from
     within  the  at-job.  For  example,  this "daily-processing"
     script named my.daily runs every day (although crontab is  a
     more appropriate vehicle for such work):

     # my.daily runs every day
     at now tomorrow < my.daily
     daily-processing


To run "daily-processing\*" everyday, starting from today and now, do ...

$ cat > misc/my.daily
# my.daily runs every day
at now tomorrow < misc/my.daily
daily-processing_1.sh
daily-processing_2.sh
daily-processing_3.sh
\^D
$ sh misc/my.daily
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today