LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2012, 09:21 AM   #1
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Rep: Reputation: Disabled
Making a cronjob for downing the database and poweing off the system,


hello every body,

i am using ASYCUDA++ system which for custom's, the server is after taking a backup is running again on 19:30, so i am going to be down automatically on 19:31 the ASYCUDA++ and oracle database, and also power off the system,

please help me in this regard,
 
Old 09-18-2012, 09:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it wouldn't be a cron job, you're better off using at.

Code:
at 19:31 /sbin/poweroff
 
Old 09-18-2012, 09:35 AM   #3
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
while i am trying to use this in my test serve, it says there is no crontba for root user.
crontab is installing a new cronjob
 
Old 09-18-2012, 02:30 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I suggested already that you shouldn't use cron.
 
Old 09-18-2012, 02:35 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by yousefzad View Post
...the server is after taking a backup is running again on 19:30, so i am going to be down automatically on 19:31...
That's got to be the smallest Oracle DB dump I've ever seen.
 
Old 09-19-2012, 08:49 AM   #6
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
then what to do dear?
 
Old 09-19-2012, 09:23 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
as above, you should use at. And don't call people "dear", it's what you'd call your wife.
 
Old 09-19-2012, 09:31 AM   #8
yousefzad
LQ Newbie
 
Registered: May 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
thanks and sorry, but still i have the problem, it seems there is no crontab file or smothing like that in the system, because while i am going to save your mentioned cron job it says nothing installed and there is no crontab in the path.
 
Old 09-19-2012, 09:48 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
last time.

don't use cron.

use at.

http://unixhelp.ed.ac.uk/CGI/man-cgi?at
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with cronjob and system commnd mustafa12 Solaris / OpenSolaris 1 10-22-2009 05:44 AM
Problem downing wlan0 and powering down the box manimal29 Red Hat 1 06-08-2009 10:13 AM
MAC Spoofing without downing the interface? makuro Linux - Networking 1 10-10-2006 07:11 AM
Best language for database making? yellowtrolley Programming 13 11-01-2004 06:47 PM
making a cronjob on redhat 8 evian Linux - General 1 08-20-2003 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration