Multiple Crontabs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Multiple Crontabs
# 1  
Old 02-09-2012
Multiple Crontabs

I have a crontab job in my sun solaris server and basically i have a unix script in 3 different parts

1 part will do an auto ftp from a server

2 part will have some grep and awk related commands and generate certain files

3 part the files that are generated above will be auto ftpied again to the source server.

when i put above 3 parts in crontab using && also the 2nd and 3rd part is not executing properly and even if merge all the above 3 tasks in one crontab also it is not executing.

what is the best way to execute and automate the scripts.
# 2  
Old 02-09-2012
One simple thing would be create a new script and from inside the new script invoke the script 1,script 2 and script 3.
Add the new script to crontab entry.

Or
in crontab try with below format
* * * * * script1;script2;script3
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed parser behaving strange on replacing multiple words in multiple files

I have 4000 files like $cat clus_grp_seq10_g.phy 18 1002 anig_OJJ65951_1 ATGGTTTCGCAGCGTGATAGAGAATTGTTTAGGGATGATATTCGCTCGCGAGGAACGAAGCTCAATGCTGCCGAGCGCGAGAGTCTGCTAAGGCCATATCTGCCAGATCCGTCTGACCTTCCACGCAGGCCACTTCAGCGGCGCAAGAAGGTTCCTCG aver_OOF92921_1 ... (1 Reply)
Discussion started by: sammy777888
1 Replies

2. Shell Programming and Scripting

Removing carriage returns from multiple lines in multiple files of different number of columns

Hello Gurus, I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file. 1|ABC DEF|100|10 2|PQ RS T|200|20 3| UVWXYZ|300|30 4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies

3. Shell Programming and Scripting

Reading multiple values from multiple lines and columns and setting them to unique variables.

Hello, I would like to ask for help with csh script. An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies

4. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

5. Shell Programming and Scripting

Awk match multiple columns in multiple lines in single file

Hi, Input 7488 7389 chr1.fa chr1.fa 3546 9887 chr5.fa chr9.fa 7387 7898 chrX.fa chr3.fa 7488 7389 chr21.fa chr3.fa 7488 7389 chr1.fa chr1.fa 3546 9887 chr9.fa chr5.fa 7898 7387 chrX.fa chr3.fa Desired Output 7488 7389 chr1.fa chr1.fa 2 3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

6. Programming

Control multiple program instances - open multiple files problem

Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine. So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files. My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Discussion started by: hakermania
3 Replies

7. UNIX for Dummies Questions & Answers

grep command to find multiple strings in multiple lines in a file.

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. I am writing it another way to make it clear, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies

8. Shell Programming and Scripting

crontabs entry not working

Hi, I have a crontab entry like the one shown below. My aim is to run the script from 06.10pm to 06.10am. But it seems not working. 10 18-06 * * * /usr/local/proj/cgi-bin/printmsg.pl 1>> /usr/local/proj/cgi-bin/printmsg.pl 2>> /usr/local/proj/cronlogs/printmsg.log Is... (2 Replies)
Discussion started by: DILEEP410
2 Replies

9. UNIX for Advanced & Expert Users

Monitoring Crontabs

Hi So, here is a million doller question. Being a Unix and Linux Admin we all use cront jobs to automate our tasks. But what if we need to monitor the cronjob itself. Oh!!! boy that can be a pain. Few Techniques: 1. Redirect the output of the cronjob to a log file.:p 2. Using MAILTO option... (4 Replies)
Discussion started by: r00t4u
4 Replies

10. UNIX for Advanced & Expert Users

Jobs scheduled in crontabs are not running after a migration to oracle 9i

Good Morning. The problem started after tha migration to a newer version of oracle - migration to oracle 9i. Before the migration jobs that were scheduled in crontabs were running ok. but after the migration they are not running. I understand that is not easy to find out what the problem is.... (4 Replies)
Discussion started by: alexcol
4 Replies
Login or Register to Ask a Question