![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cron job starts new cron proccess | ron76 | SUN Solaris | 3 | 05-11-2008 10:07 PM |
| How to use own account env variables to cron user | Tlg13team | HP-UX | 3 | 01-28-2008 06:38 AM |
| CRON usage for CRON job | skyineyes | UNIX for Dummies Questions & Answers | 1 | 01-17-2008 07:17 AM |
| AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log | Keith Johnson | AIX | 0 | 01-09-2008 05:32 PM |
| What user runs cron? | michieka | UNIX for Dummies Questions & Answers | 10 | 06-02-2002 07:32 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
cron user
# cd /usr/lib/cron/
# ls at.deny cron.deny FIFO logchecker queuedefs I noticed I do not have a cron.allow file. I have entries in the crontab file and users listed in the at.deny cron.deny files # more at.deny daemon bin smtp nuucp listen nobody noaccess If I wanted to set a cron job, do I have to create a cron.allow file and how does it choose the user, by who submits thew job I suppose? I have a script that is run by oracle user to create a backup that I would like to cron. do I: log in as oracle, edit crontab (crontab -e) enter - 10 0 * * * /export/home/oracle/path_to_script/script.ksh (run 00:10 am every night.) then I'm done? oracle owns the script. or do I have to create a cron.allow file and add oracle to it? Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
If a cron.allow file is there, then only those listed in it can create a crontab. So you should be able to create a crontab file without it right now.
Quote:
|
|
#3
|
||||
|
||||
|
How do I se it up so I can receive an email after execution?
If I normally run the script as oracle, then does that mean the script is set for executable by oracle? I cannot open crontab -l as oracle and when I do a crontab -e it opens to vi. Do I have to be root in order to submit a crontab? If I don't - how do I exit crontab, like I exit vi normally - (wq!)?? Thanks again. Last edited by finster; 11-04-2004 at 09:01 AM. |
|
#4
|
||||
|
||||
|
Quote:
Quote:
Permissions will rwx or r-x. The userid that owns the file will be listed (may be oracle) ls -l myscript -rwx-r-xr-- 1 oracle dba 88 Nov 7 2003 myscript This file is owned by oracle but allows execution by anyone in the dba group, by oracle (since it owns it) but only read for anyone else. Quote:
* * * * * date > /tmp/oracle-test.date Exit as you normally do from vi (saving the file wq). Then run crontab -l and you should see that entry. Quote:
|
|
#5
|
||||
|
||||
|
bash-2.03$ crontab -e
0 * * * * * date > /tmp/oracle-test.date^[ Can't exit from line, when I hit the esc key(to go into command mode) I get ^[. If I hit enter I get a ? on a new line. Also what is the # "0" displayed after executing crontab -e? When I do a crontab -e as root I get: # crontab -e 482 |
|
#6
|
|||
|
|||
|
It is because default editor is set to 'ed'. Change it to 'vi'
$PROPMT> export EDITOR=vi |
|
#7
|
||||
|
||||
|
Crontab=
45 22 * * * /export/home/oracle/script.ksh in /var/cron/log > CMD: /export/home/oracle/script.ksh > oracle 5235 c Thu Nov 4 22:45:00 2004 < oracle 5235 c Thu Nov 4 22:45:00 2004 rc=127 what does this rc=127 means. (rc=127 can't fork ) Path and filename is correct. ____________________________________ Checked my mail: Your "cron" job on server1 /export/home/oracle/script.ksh produced the following output: /export/home/oracle/script.ksh[11]: exp: not found _________________________________________ job didn't run. help. When I run it manually I cd to directory and type ./script.ksh and it works. I tried crontab: 45 22 * * * cd /export/home/oracle;./script.ksh with same results. I am guessing that I may need to source my env, if exp is not found? (script uses exp to backup tables) What's the best way to proceed and is this correct? Last edited by finster; 11-04-2004 at 11:35 PM. |
||||
| Google The UNIX and Linux Forums |