Solved

Cron Syntax

Posted on 2014-03-11
8
297 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
android secure ftp 3 68
How to mount nfs share on this CentOS server? 6 51
Linux mount of Windows Shared Now Fails 8 111
expand ext4 on centos 6 5 52
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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.

685 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