Sponsored Content
Full Discussion: Crontab setting
Top Forums UNIX for Dummies Questions & Answers Crontab setting Post 302888404 by Akshay Hegde on Friday 14th of February 2014 05:58:54 AM
Old 02-14-2014
sudo crontab -e --> Enter root password

Choose 1-3 [2]: x --> Enter which editor you want

30 0 * * * /home/srv/script.sh > /home/srv/logtest.log 2>&1 --> Paste this and save

Here standard error (2>) is redirected to the same file that is pointed by standard output (&1)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

New ip setting

I want to change the IPsetting and the broadcast setting. With ipconfig I get this: hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet xx.17x.18x.xx netmask fffffff0 broadcast xx.17x.18x.xx ether yy:0:yy:b6:yy:xx What command(squence) do I use to... (6 Replies)
Discussion started by: kuultak
6 Replies

2. Shell Programming and Scripting

Setting crontab

Hey all, I would like to know how to set a cron job to run from 8:15 am to 4:00 pm? Or do I have to do this in 2 seperates cron? Thanks! (4 Replies)
Discussion started by: mpang_
4 Replies

3. Linux

Setting up crontab, still cant get it to work

OK I have been working on this simple action for a while and I cannot get it to work. First off im new to the linux command line world. I feel like I am missing something simple. What I am trying to achieve is that I want this command: tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W36 &to... (13 Replies)
Discussion started by: Nasasdge
13 Replies

4. Shell Programming and Scripting

Crontab setting error

Hi All, I have created crontab using following steps- 1) crontab -e (edited the file with) 0 10 * * 1-5 /home/user01/exercise/cron.sh 2) then saved this file with :wq 3) cron.sh contains the code- #!/bin/bash DAY=`date +%a` mkdir abc_${DAY} 4) done the execut permision... (3 Replies)
Discussion started by: pspriyanka
3 Replies

5. Solaris

Crontab date setting problem

Hi, 0 9 1,2,3,4,5,6,7 3,4 6 I want a cronjob to run on every 1st Sat of Mar & Apr. But the above schedule is running is running on the 1st 7 days. How do i rectify it? Thanks in advance. (2 Replies)
Discussion started by: beginningDBA
2 Replies

6. UNIX for Dummies Questions & Answers

Setting PS1

I have set PSI for my prompt using the following command: PS1="${debian_chroot:+($debian_chroot)}\\u@\h:\\\w\a]\ "which produces chrisd@pguk:~]I want to include [ in the beginning but cannot understand the way to do this. Also I want to show only the current directory, not the whole... (4 Replies)
Discussion started by: kristinu
4 Replies

7. Solaris

Crontab date setting problem

Hi, i wanted to schedule a backup script to run on 7.30pm every 1st Sat of month MAR, APR, SEP, OCT. Am i understanding it correctly? Because it doesn't seem to run according to the schedule i needed. = (7.30pm) & (1st to 7th day of the month) & (MAR, APR, SEP, OCT) & (Sat) 30 19 1-7... (1 Reply)
Discussion started by: beginningDBA
1 Replies

8. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

9. Shell Programming and Scripting

Crontab setting

Hi All, Can anyone tell me how to schedule the dbshell.sh script to run on sunday. I have scheduled as 1 19 7 * * /home/svr/dbshell.sh. kindly confirm confirm whether coded "7" or it should set to '0'. unix:$ crontab -l 0 19 6 * * /home/svr/dbemail.sh 1 19 7 * * /home/svr/dbshell.sh (2 Replies)
Discussion started by: arun888
2 Replies

10. Linux

Setting Up Google 2F Authentication for Automated (Crontab) rsync

Dear All, I have Google Two Factor (2F) Authentication enabled for sshd on most of my Linux servers. This works well and I highly recommend it. My question is: Has anyone set this up for rsync which runs in a crontab? For example, supposed we have this simple crontab script: ... (5 Replies)
Discussion started by: Neo
5 Replies
CRONTAB(1)						    BSD 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
The crontab utility 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 they are not intended to be edited directly. (Darwin note: Although cron(8) and crontab(5) are officially supported under Darwin, their functionality has been absorbed into launchd(8), which provides a more flexible way of automatically executing commands. See launchctl(1) for more information.) If the /usr/lib/cron/cron.allow file exists, then you must be listed therein in order to be allowed to use this command. If the /usr/lib/cron/cron.allow file does not exist but the /usr/lib/cron/cron.deny file does exist, then you must not be listed in the /usr/lib/cron/cron.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. The format of these files is one username per line, with no leading or trailing whitespace. Lines of other formats will be ignored, and so can be used for com- ments. 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 following options are available: -u Specify 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(1) can confuse crontab and that if you are running inside of su(1) you should always use the -u option for safety's sake. -l Display the current crontab on standard output. -r Remove the current crontab. -e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. The specified editor must edit the file in place; any editor that unlinks the file and recreates it cannot be used. After you exit from the editor, the modified crontab will be installed automatically. FILES
/usr/lib/cron/cron.allow /usr/lib/cron/cron.deny DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line. SEE ALSO
crontab(5), compat(5), cron(8), launchctl(1) STANDARDS
The crontab command conforms to IEEE Std 1003.2 (``POSIX.2''). The new command syntax differs from previous versions of Vixie Cron, as well as from the classic SVR3 syntax. AUTHORS
Paul Vixie <paul@vix.com> BSD
December 29, 1993 BSD
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy