• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Cron Syntax

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
xoxomos
Asked:
xoxomos
4 Solutions
 
ozoCommented:
0,15,30,45 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl
0
 
Seth SimmonsSr. Systems AdministratorCommented:
ozo's syntax is correct
your syntax has cp run only 15 min after every hour, not every 15 min
0
 
savoneCommented:
*/15 * * * * cp /data/BB60/control01.ctl /rman/standby/control01.ctl

Will also work and is a little cleaner.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
omarfaridCommented:
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
 
SandyCommented:
all well just use */15 instead of 15

TY/SA
0
 
xoxomosAuthor Commented:
Thanks.  Anybody know how do i increase points?  Not seeing that option.
0
 
omarfaridCommented:
You should have the option to increase points. You could ask for administrator help
0
 
xoxomosAuthor Commented:
Thanks all.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now