Solved

Cron Syntax

Posted on 2014-03-11
8
291 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
Comment Utility
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
Comment Utility
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
Comment Utility
*/15 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl

Will also work and is a little cleaner.
0
 
LVL 40

Expert Comment

by:omarfarid
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Assisted Solution

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

TY/SA
0
 

Author Comment

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

Expert Comment

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

Author Closing Comment

by:xoxomos
Comment Utility
Thanks all.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now