Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-15-2003, 04:20 PM   #1
LQ Newbie
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Setting cron by php code?

Is it possible to set a cron job by php code?

For example, I have a script where you can select yes or no in the form. Depending on what the user selects the script sets a cron job or deletes it.

If the user selects "yes" then a cron is set via php code, if "no" then it is either deleted or not set.

Can this be done?
Old 10-15-2003, 06:41 PM   #2
LQ Newbie
Registered: Jul 2003
Location: London, UK
Distribution: Slackware(x2), Debian, Redhat(x2)
Posts: 14

Rep: Reputation: 0
yes, it can be done...

it would proberly be a case of opening your crontab file and writing a new line to the end, or re-writing the file except for one line.

Check for file functions.



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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
how to make a simple code for just restarting Apache via a Cron job hsa Programming 1 08-22-2005 04:15 AM
cron and PHP bokini Programming 2 07-28-2005 04:56 PM
Freshclam exit code & cron timmywo Linux - General 0 05-21-2005 10:55 AM
Setting a cron nitaish Linux - General 6 11-03-2004 07:43 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:23 AM.

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