Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sybase - How to edit cron schedule for sybase backups

Posted on 2013-12-12
3
Medium Priority
?
1,071 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
  • 2
3 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 2000 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

971 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