Cron Syntax

Posted on 2014-03-11
Medium Priority
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
Question by:xoxomos
LVL 85

Accepted Solution

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

Assisted Solution

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

Assisted Solution

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

Will also work and is a little cleaner.
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

LVL 40

Expert Comment

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
LVL 13

Assisted Solution

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


Author Comment

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

Expert Comment

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

Author Closing Comment

ID: 39927694
Thanks all.

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

622 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