Sponsored Content
Top Forums Shell Programming and Scripting Adding a job to crontab via shell script Post 302365390 by proactiveaditya on Monday 26th of October 2009 11:29:12 PM
Old 10-27-2009
Adding a job to crontab via shell script

Is it possible to add a job to crontab with a shell script? The existing jobs in the crontab should exist as it was. The new job should be appended.
Also, the crontab file is /var/spool/cron/root.

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

crontab job

Hi, I have cornjob was scheduled at 1:00 AM everyday. It has been running fine since last Saturday. But it didn't run since Saturday. Because of daytime saving time change it didn't ran? Please send me your thoughts. Thanks in adavance. Moe (3 Replies)
Discussion started by: Moe
3 Replies

2. Shell Programming and Scripting

Help with a crontab job!!!

Hi, i need to schedule a script to run at 6.10AM everyday.I tried to do this way. #!bin/ksh 10 06 * * 0-6 sh /tmp/ss/script/daily_file_check.sh And at the command prompt I did >crontab -e cron.txt I'm not sure whether this is the right way. Can anyone please tell me how to... (4 Replies)
Discussion started by: kumarsaravana_s
4 Replies

3. Shell Programming and Scripting

Adding options to a shell script

I want to add options to my shell script but having problems, my code so far is; #!/bin/bash lflag= iflag= while getopts 'l:i:' OPTION do case $OPTION in l) lflag=1 lval="$OPTARG" ;;... (1 Reply)
Discussion started by: paulobrad
1 Replies

4. Shell Programming and Scripting

How do i run a shell script without crontab.

Hi Folks, Could you please suggest me how to run a shell script on a solaris env without using crontab. I am actually trying to write a shell script which will grep "WORD" in the logfile andd sends a email.Thanks in advance. Thanks Sandeep. (3 Replies)
Discussion started by: sandeep anand
3 Replies

5. Shell Programming and Scripting

Cron job shell script..

Hey Guys, i was trying out a shell script which has to remove a file for every 90 mins. this is the code i came up with . $ crontab -e file1 file1 contains 30 1 * * * * rm -r /folder1/folder2/somefile.txt Now i need the cron to run for every 90 mins. the problem with this is... (8 Replies)
Discussion started by: Irishboy24
8 Replies

6. Shell Programming and Scripting

I need to do a work to my job, but i m new in script shell, someone can help with this..

I need to do a work to my job, but i m new in script shell, someone can help with this.. :confused: Description Bsafe The command creates a backup directory of each month at the command line (arguments of the script). The names of directories to copy will always be specified for the... (4 Replies)
Discussion started by: strshel
4 Replies

7. Shell Programming and Scripting

use crontab for a shell script..

hi, i have shell script which checks for service running on platform, if service is receiving calls, then do nothing if service is not receiving calls, then stop the service i want to run this script in 2 timeslots. i.e. in the day from 9 am to 5 pm it should run every 10 minutes and ... (2 Replies)
Discussion started by: gauravah
2 Replies

8. Shell Programming and Scripting

Shell Script to grep Job File name and Log File name from crontab -l

Hello, I am new to shell scripting. I need to write a shell script where i can grep the name of file ie. .sh file and log file from crontab -l. #51 18 * * * /home/oracle/refresh/refresh_ug634.sh > /home/oracle/refresh/refresh_ug634.sh.log 2>&1 #40 17 * * * /home/oracle/refresh/refresh_ux634.sh... (1 Reply)
Discussion started by: guptra
1 Replies

9. Shell Programming and Scripting

Need Help with a Shell Script for a Job

Hi Guys, I need your help with setting up a shell script for the following job. Please help. Encrypted file received at the SFTP server (.55 network - DMZ) from ABC company Encrypted file is passed into the internal network (.52 or .53) in one of the system and comes to Folder 'A' A script... (8 Replies)
Discussion started by: sam0912
8 Replies

10. Shell Programming and Scripting

Adding Two Array in shell script

Hi Experts, I've got this problem where I need to add two array in shell script such that that is an element is greater than 9 then it get further split into individual digit, something like below : Input :- array1=(2 6 8 9 10 12) array2=(5 4 6 8 12 14) Output :- array3=(7 1 0 1 4 1 7 2 2... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
CRON(8) 						      System Manager's Manual							   CRON(8)

cron - daemon to execute scheduled commands (Vixie Cron) SYNOPSIS
Cron should be started from /etc/rc or /etc/rc.local. It will return immediately, so you don't need to start it with '&'. Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into memory. Cron also searches for /etc/crontab and the files in the /etc/cron.d/ directory, which are in a different format (see crontab(5)). Cron then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When execut- ing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified. Note that the Crontab(1) command updates the modtime of the spool directory whenever it changes a crontab. SEE ALSO
crontab(1), crontab(5) AUTHOR
Paul Vixie <paul@vix.com> 4th Berkeley Distribution 20 December 1993 CRON(8)

Featured Tech Videos

All times are GMT -4. The time now is 08:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy