Solved

Sybase - How to edit cron schedule for sybase backups

Posted on 2013-12-12
3
924 Views
Last Modified: 2014-01-14
I have a following cron schedule for sybase log backups. My questions iw how do I edit this cron job so that the cron schedule will run every  6 hrs daily


10,40 * * * * /opt/sybase/home/edt_local/bin/backup_sybase Instance_1_S -trans
15,45 * * * * /opt/sybase/home/edt_local/bin/backup_sybase Instance_2_S -trans
0
Comment
Question by:motioneye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 500 total points
ID: 39715748
So the first entry is for minutes and the second entry is for hour.

You may need minutes to be 0 and hours to be */6

So your first entry would be like

0 */6 * * * /opt/sybase/home/edt_local/bin/backup_sybase Instance_1_S -trans

Open in new window

0
 

Author Comment

by:motioneye
ID: 39715874
Hi,
Do you have the step how to edit the cronjob above ?
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 39716026
First you have to have permission to use crontab or you have to be a root user.

So you need to figure out the user who would run the crontab.

Become that user using

su -  username

Open in new window


or

su -

Open in new window


for becoming a root user.


Then you issue command

visudo

Open in new window


This should open the crontab in vi editor.  You also will be able to see all the cron entries this user has.

Press i for insert mode.

Type your entry.

Esc for command mode.

:x
To save changes and exit.

crontab -l would list all the cron entries the user has.

Done
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
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…

739 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