07-03-2009
Quote:
Originally Posted by
jim mcnamara
Also, it seems like you are using vi on your crontab. Don't. Use crontab -l or crontab -e
I always VI my crontabs
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Why does this cron entry do nothing? It works interactively.
58 23 * * * mydate=`date '+%Y%m%d'`;mv /opt/home/user/file /opt/home/user/file_$mydate (5 Replies)
Discussion started by: steelrose
5 Replies
2. Solaris
HI all,
I would want to schedule a job to run every 2 weeks. In the mean time, i'm only able to schedule on every week. Is it possible to schedule 2 weeks on crontab?
Thank you. (3 Replies)
Discussion started by: *Jess*
3 Replies
3. UNIX for Dummies Questions & Answers
I set up a job to run a script in a certain directory to remove certain files. The script seems to run as my logs indicate but nothing happens. If I run the script manually then it removes the correct files. I'm now wondering if crontab doesnt have access to remove files from the directory I'm... (9 Replies)
Discussion started by: NycUnxer
9 Replies
4. AIX
My question is how to specify the one-time execution of a shell script in crontab?
For example: If I wanted to schedule shell "Test.sh" for one-time execution on December 13 at 8:00AM would it be as follows?
00 08 13 12 6 /usr/datatools/dtbackups/Test.sh > /usr/u/sybase_12.5/logs/Test.log &... (3 Replies)
Discussion started by: Alan.AIX
3 Replies
5. UNIX for Dummies Questions & Answers
Hello guys,
I have a server with Red Hat Enterprise Linux AS release 4 (Nahant Update 5), there i have a lot of users, im the root. I need to lock the use of crontab to the users, i mean, i dont want to give to the users the option to creat any crontab line, how can i do that?
I tried to... (4 Replies)
Discussion started by: lestat_ecuador
4 Replies
6. Shell Programming and Scripting
I have a user (xxx) who is allowed to run cron jobs when a job is
launched from cron is the .profile sourced in? I am not sure it is so I setup a cron job as this user to do the following:
35 15 * * 0-5 su - xxx -c "ksh ls -lt /tmp" > /tmp.out
and I am seeing the following error (see... (2 Replies)
Discussion started by: BeefStu
2 Replies
7. Solaris
I want to run a script on (say) the 4th friday every month. But if I include this line in the crontab :
45 9 22-28 * 5 echo '4th Friday'|mailx -s "Fri week 4" mike
it sends me mail if the date is 22-28, OR the day is friday. So I get mail every day for a week , and also every friday.
I... (2 Replies)
Discussion started by: mikejordan
2 Replies
8. UNIX for Dummies Questions & Answers
Hey out there
This is all I have in my crontab file. I know the crontab works because it was already out there and working. I simply replaced the existing with my line of code below to see if it worked. I uploaded 6 month old pdf files in this directory, stopped/started all the scripts that... (3 Replies)
Discussion started by: vsekvsek
3 Replies
9. Shell Programming and Scripting
I need to run an script every 10th and 25th day in every month at 11pm.
the script name is /home/ss/automated.sh
I tried to execute the script every day and everytime with the below syntax. its not executing it from crontab.
* * * * * /home/ss/automated.sh
Any idea why it not... (6 Replies)
Discussion started by: ramkumar15
6 Replies
10. Shell Programming and Scripting
Hello,
I have scheduled the execution of a file (delete_oldv02) every hour with crontab and it works perfectly. See below the instruction written.
0 */1 * * * /home/delete_oldv02 >>/home/delete_oldv02.log
My first question is if I can add one more line to crontab.
I also would like to... (5 Replies)
Discussion started by: dcaccount
5 Replies
LEARN ABOUT REDHAT
crontab
CRONTAB(1) General Commands Manual CRONTAB(1)
NAME
crontab - maintain crontab files for individual users (V3)
SYNOPSIS
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }
DESCRIPTION
Crontab is the program used to install, deinstall or list the tables used to drive the cron(8) daemon in Vixie Cron. Each user can have
their own crontab, and though these are files in /var, they are not intended to be edited directly.
If the allow file exists, then you must be listed therein in order to be allowed to use this command. If the allow file does not exist but
the deny file does exist, then you must not be listed in the deny file in order to use this command. If neither of these files exists,
then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be
able to use this command.
If the -u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines
"your" crontab, i.e., the crontab of the person executing the command. Note that su(8) can confuse crontab and that if you are running
inside of su(8) you should always use the -u option for safety's sake.
The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is
given.
The -l option causes the current crontab to be displayed on standard output.
The -r option causes the current crontab to be removed.
The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit
from the editor, the modified crontab will be installed automatically.
SEE ALSO
crontab(5), cron(8)
FILES
/etc/cron.allow
/etc/cron.deny
STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax differs from previous versions of Vixie Cron, as
well as from the classic SVR3 syntax.
DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line.
AUTHOR
Paul Vixie <paul@vix.com>
4th Berkeley Distribution 29 December 1993 CRONTAB(1)