T.R | Title | User | Personal Name | Date | Lines |
---|
6990.1 | Solution found | ADOV01::SHARPE | Darwin's Dangerous Idea | Tue Sep 10 1996 21:05 | 9 |
6990.2 | | SANITY::LEMONS | And we thank you for your support. | Thu Mar 13 1997 09:16 | 7 |
| Hi
I want to run a crontab job that uses, say, csh or ksh commands. How
do I tell crontab which shell to use?
Thanks!
tl
|
6990.3 | | BIGUN::nessus.cao.dec.com::Mayne | Churchill's black dog | Thu Mar 13 1997 16:18 | 3 |
| Create a script that uses the correct shell, and call the script?
PJDM
|
6990.4 | | SANITY::LEMONS | And we thank you for your support. | Thu Mar 13 1997 18:32 | 9 |
| I know, I know, stupid question, but not for someone trying to break
into this world. A quick glance at the manual and man page didn't help
me. I'm assuming that crontab would run a sh, csh or ksh script. Will
it just figure out which shell is appropriate, and use the right one
when it runs the job? Or do I put something into my script that tells
which shell to use?
Thanks!
tl
|
6990.5 | Yup. | QUARRY::reeves | Jon Reeves, UNIX compiler group | Thu Mar 13 1997 18:55 | 6 |
| If the first line in your shell script is
#!/bin/csh
the script will be run by csh. Similarly for the others (or in fact,
any arbitrary command like awk or perl).
|
6990.6 | | HELIX::SONTAKKE | | Fri Mar 14 1997 09:13 | 6 |
| Is there a way to use crontab by mere mortals? What's the equivalent
way to do it by non-root users?
kamlia 6% crontab -l c
crontab: you are not authorized to use cron. Sorry.
|
6990.7 | | DECWET::MARTIN | | Fri Mar 14 1997 16:32 | 9 |
| From the man page on crontab(1), in v4.0,
[XPG4-UNIX] You can use the crontab command if your username appears in
the /usr/lib/cron/cron.allow file. If that file does not exist, the cron-
tab command checks the /usr/lib/cron/cron.deny file to determine if you
should be denied access to crontab. The allow/deny files contain one user-
name per line. If neither file exists, you can submit a job only if you
are operating with superuser authority.
|
6990.8 | But why ?? | HELIX::SONTAKKE | | Mon Mar 17 1997 11:31 | 9 |
| So, I guess that unless blessed by the God, batch jobs are off limits
to mere mortal in Digital UNIX?
If I were to write my own stupid program to sleep() and system(), then
there is nothing in the system to deny me that, correct?
So why the brain-dead .allow and .deny business ?
- Vikas
|
6990.9 | | IOSG::MARSHALL | | Mon Mar 24 1997 12:45 | 16 |
| >> batch jobs are off limits
No; see batch(1). You just can't specify a particular time (for that you need
at(1), which again uses .allow/.deny).
>> why the brain-dead .allow and .deny business ?
For cron(8), I guess it's 'cos cron is meant for system-y type things rather
than user things. For at(1) I guess it's so the system manager can, err, manage
the system...
>> my own stupid program to sleep() and system()
How about just: $ (sleep n; command) &
Scott
|