Solved

Cron Syntax

Posted on 2014-03-11
8
295 Views
Last Modified: 2014-03-13
Trying to copy a file to a different location every fifteen minutes.
What am I doing wrong?
15 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl
0
Comment
Question by:xoxomos
8 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 200 total points
ID: 39922299
0,15,30,45 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl
0
 
LVL 34

Assisted Solution

by:Seth Simmons
Seth Simmons earned 50 total points
ID: 39922359
ozo's syntax is correct
your syntax has cp run only 15 min after every hour, not every 15 min
0
 
LVL 23

Assisted Solution

by:savone
savone earned 200 total points
ID: 39922384
*/15 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl

Will also work and is a little cleaner.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 40

Expert Comment

by:omarfarid
ID: 39922520
On some systems you need to use the full path name for the command used:

*/15 * * * * /usr/bin/cp /data/BB60/control01.ctl /rman/standby/control01.ctl >> /tmp/mycron.log 2&>1
0
 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 50 total points
ID: 39923078
all well just use */15 instead of 15

TY/SA
0
 

Author Comment

by:xoxomos
ID: 39924023
Thanks.  Anybody know how do i increase points?  Not seeing that option.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 39924634
You should have the option to increase points. You could ask for administrator help
0
 

Author Closing Comment

by:xoxomos
ID: 39927694
Thanks all.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question