LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-09-2006, 11:31 AM   #1
mark8569
LQ Newbie
 
Registered: Oct 2006
Distribution: SUSE 10.0
Posts: 9

Rep: Reputation: 0
Unhappy Cant seem to place items into cron.hourly


I am attempting to write a perl script that will log my CPU usage every hour, I have been informed that I should do this will cron. I have read through some of the other posts and they have not help.

I have written a script that gets the information that I need and I have tried to place it into /etc/cron.hourly however it just tells me that I do not have the necessary permissions to write to that location. I understand that if I had root access I would be able to do this but I do not know how to get it. As far as I understand I should have full access as I am the only user on my computer.

Please can someone help.

Thanks

Mark
 
Old 12-09-2006, 11:34 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
so the question is really, how do you log in as root? run "su -" in a console and enter the root password. then you can do whatever you want. also though, you don't *need* to put it there, every user can run their own crontab by default, just run "crontab -e" and add your own. you would need to recreate the hourly / daily lark yourself though within your own user directory if you want to use that simple framework.
 
Old 12-09-2006, 11:53 AM   #3
mark8569
LQ Newbie
 
Registered: Oct 2006
Distribution: SUSE 10.0
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for you quick reply. However I do not know how to use crontab at all could you give me some more info or direct me somewhere where I can read up on it please.
 
Old 12-09-2006, 12:31 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 was basically advising you not to use it... just become root and put your script in the pre-created cron.hourly directory
 
Old 12-09-2006, 01:34 PM   #5
mark8569
LQ Newbie
 
Registered: Oct 2006
Distribution: SUSE 10.0
Posts: 9

Original Poster
Rep: Reputation: 0
Ah right I see, problem is I dont know how to move files using the console. Could you give me a quick example please.

thanks

Mark
 
Old 12-09-2006, 01:41 PM   #6
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
http://rute.2038bug.com/index.html.gz
 
  


Reply



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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
script in cron.hourly not running hourly unholy Linux - Software 2 09-19-2006 08:21 PM
shutup cron.hourly mail reports darkleaf Linux - Software 4 06-27-2005 10:28 AM
cron.hourly question Raw Kuts Linux - Newbie 1 08-18-2003 12:34 PM
How do I run/write an hourly cron? KoopaTroopa Linux - Newbie 1 08-16-2003 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:43 PM.

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