08-26-2002
/agree Auswipe full path is always best
I must reluctantly agree with Auswipe.
hehehe
It is a good practice and good security to ALWAYS use the full path in any cron entry and in the scripts that you write.
The reason for this is, it is a very easy way for someone to replace any binary on your system with a trojan.
Always use full path AND always keep a backup copy of crontab for all users that have one especially cron.
10 More Discussions You Might Find Interesting
1. Solaris
When I list whats in cron -l its fine but when I try to -e edit it...it returns a number 309 can't you not edit cron this way with solaris 10? I can do it fine in sol 8 and 9.
export EDITOR="vi" is set in my profile
I am using BASH
$ sudo crontab -l
Password:
#ident "@(#)root ... (5 Replies)
Discussion started by: kingdbag
5 Replies
2. Red Hat
Hello,
Having and issue with a job scheduled in cron. The script:
#!/bin/bash
2
3 # Example shell script which can be added to roots cron job to check the
4 # Embedded Satellite disk space usage. If any table is over 90% usage, send
5 # a notice to the default email address... (2 Replies)
Discussion started by: mgb
2 Replies
3. Shell Programming and Scripting
Hi Guys.,,
This thing is driving me crazy..
I have this script which runs perfectly fine. If it is not able to connect to database it will drop a mail which it does when i ran it manually.
But when i am running it from crontab, the script is not sending mail to me but to my id(login id)... (0 Replies)
Discussion started by: mac4rfree
0 Replies
4. Red Hat
Hey all! I'm working on setting up a script to run with cron. I have thus far been unable to get it to successfully complete. I'm hoping you gurus can lend me a hand.
This is my crontab, the transfer script works fine the backup will not. The backup however does work when I execute it from the... (11 Replies)
Discussion started by: spiffyville
11 Replies
5. Shell Programming and Scripting
Hi Gurus,
I need to run a script every saturday at 7:05 PM. Below command is working in x86_64.
05 19 * * 6 /apps/informatica/scripts/inf_rest.ksh
However when I tried in HP-UX it is giving the below error.
crontab: error on previous line; unexpected character found in line.
Please... (4 Replies)
Discussion started by: svajhala
4 Replies
6. UNIX for Advanced & Expert Users
I have written a custom cron. This cron executes a rake task every 5 minutes. I also log the trace of this execution in a file locally on my server. The whole process seems to execute seamlessly every 5 minutes, but then it seems to log it in /var/log/syslog. I investigated on the syslog and found... (0 Replies)
Discussion started by: manjunath.nm89
0 Replies
7. UNIX for Dummies Questions & Answers
I have written a custom cron. This cron executes a rake task every 5 minutes. I also log the trace of this execution in a file locally on my server. The whole process seems to execute seamlessly every 5 minutes, but then it seems to log it in /var/log/syslog. I investigated on the syslog and found... (0 Replies)
Discussion started by: manjunath.nm89
0 Replies
8. Ubuntu
I have written a custom cron. This cron executes a rake task every 5 minutes. I also log the trace of this execution in a file locally on my server. The whole process seems to execute seamlessly every 5 minutes, but then it seems to log it in /var/log/syslog. I investigated on the syslog and found... (3 Replies)
Discussion started by: manjunath.nm89
3 Replies
9. Solaris
Hello, I am running Solaris 8. I have set a cron job that runs every couple hours. If I run the script manually, it runs just fine (logged in as root). The cron however will not run. It is producing an rc=1 error. Any thoughts would be appreciated. Thanks (4 Replies)
Discussion started by: jkmtm
4 Replies
10. Shell Programming and Scripting
i have written a script to sftp yesterday's logs from another server as below:
cd /export/home/abc/xyz/tt
d=`gdate -d'yesterday' +%Y%m%d`
sftp abc@XXX.XX.XX.XX<<EOF
cd /yyy/logs/archive
mget abc.log.$d*
EOF
cd /export/home/abc/xyz/scripts
nohup ./ss.sh PROD &
it is working fine... (2 Replies)
Discussion started by: ssk250
2 Replies
cron(8) System Manager's Manual cron(8)
NAME
cron - The system clock daemon
SYNOPSIS
/usr/sbin/cron
DESCRIPTION
The cron daemon runs shell commands at specified dates and times. Commands that are to run according to a regular or periodic schedule are
found within the crontab files. Commands that are to run once only are found within the at files. You submit crontab and at file entries
by using the crontab and at commands. Because the cron process exits only when killed or when the system stops, only one cron daemon
should exist on the system at any given time. Normally, you start the cron daemon from within a run command file.
During process initialization and when cron detects a change, it examines the crontab and at files. This strategy reduces the overhead of
checking for new or changed files at regularly scheduled intervals. The cron command creates a log of its activities. The cron daemon
must be started from the system startup scripts because it must begin execution without a login user ID set. The cron daemon starts each
job with the following process attributes stored with the job by the invoking process: Login user ID Effective and real user IDs Effective
and real group IDs Supplementary groups
It also establishes the following attributes from the authentication profile of the account associated with the login user ID of the invok-
ing process: Audit control and disposition masks Kernel authorizations
DIAGNOSTICS
The at and batch programs will refuse to accept jobs submitted from processes whose login user ID is different from the real user ID.
FILES
Specifies the command path. Main cron directory Directory containing the crontab files. List of allowed users. List of denied users His-
tory information for cron Queue description file for at, batch, and cron
RELATED INFORMATION
Commands: at(1), crontab(1), rc0(8), rc2(8), rc3(8)
Files: queuedefs(4) delim off
cron(8)