Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Way to retrieve and/or edit CRON infomation?
Old 03-16-2008, 07:53 AM Way to retrieve and/or edit CRON infomation?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Hello,

im working with cron's more and more, and i would like to know if there is a easy way to a) retrieve the cron infomation, IE time and the script etc
and if possible edit, add, remove the cron jobs through PHP?

Is this possible and how would i go about doing it?
Thanks,
Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 03-16-2008, 01:39 PM Re: Way to retrieve and/or edit CRON infomation?
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
Nope, you're not going to be able to use PHP. It's all Linux commands.
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
Old 03-16-2008, 01:48 PM Re: Way to retrieve and/or edit CRON infomation?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Well could i used PHP to execute them using System/exec ?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 03-16-2008, 03:05 PM Re: Way to retrieve and/or edit CRON infomation?
Junior Talker

Posts: 3
Name: Jack
Trades: 0
Quote:
Originally Posted by dansgalaxy View Post
Well could i used PHP to execute them using System/exec ?
cron its part of linux shell.

use c++ scripts for internal cron control.
__________________

Please login or register to view this content. Registration is FREE
jeton is offline
Reply With Quote
View Public Profile Visit jeton's homepage!
 
Old 03-16-2008, 03:46 PM Re: Way to retrieve and/or edit CRON infomation?
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
Yer I'd stick with C++. I mean I guess you could use PHP somewhat but no matter what you're going to have to use more than PHP.
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
Old 03-16-2008, 05:11 PM Re: Way to retrieve and/or edit CRON infomation?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Does cpanel have any kind of api? so i could have the same kind of thing which cpanel has to manage crons but within my own site control panel.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 03-16-2008, 06:50 PM Re: Way to retrieve and/or edit CRON infomation?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Cron is a unix tool, right, but it's mostly aimed as being ran by the machine administrator account (though some implementation like Vixie allows users to have their own cron file) and so, letting PHP access it means that you remove any kind of security on the file.

Cron is the process, and it reads a crontab file (usually /etc/crontab).
Modify that file, and you change what cron does.
To allow the web server user to do that, means that you must make that file world writable.

Now, call me paranoid, but imagine a script kiddies breaking one account, and putting a
Code:
* * * * *  root rm -rf /
in your crontab...

I'm not really sure you would like to do that...
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-16-2008, 07:23 PM Re: Way to retrieve and/or edit CRON infomation?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Okay i get you...

So would be complicated and i couldnt do it anyway without root access...

D'oh
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Way to retrieve and/or edit CRON infomation?
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.38498 seconds with 12 queries