Jump to content


Photo

Timing (Creating your own Cron Job)


  • Please log in to reply
4 replies to this topic

#1 Neptunus Maris

Neptunus Maris
  • Members
  • PipPipPip
  • Advanced Member
  • 192 posts

Posted 27 October 2006 - 07:17 AM

I'm having trouble creating a cron job of my own....the reason why im not using cron jobs on my server is because the thing i want is detailed...or just say i want to create a cron job entirely myself.

Now, I've tried something like this:

time()+1800 something like that(like in a cookie timer) and it runs in some loop:

while ($cron = time()+2400) {

if ($cron = 1800) {
    $month = January;
}

if ($cron = 1200) {
    $month = Feb...;
}

((and so on...))
} //end while

I hope you get the idea of what im talking about.


Neptune


#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 October 2006 - 07:51 AM

Dont mean to be a downer but this wont work as a cron opens a page to execuite at a certon time or date.

there issint any over way so your have to get a 3rd party aplication as the page needs to be executed.

i have seen even the best computer programmers give up so i adivse the 3rd party method.

what i am trying to get accross even if your code is properly coded then how would you get the code to execute and open the browser then exicute the page.

sorry.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Neptunus Maris

Neptunus Maris
  • Members
  • PipPipPip
  • Advanced Member
  • 192 posts

Posted 27 October 2006 - 07:56 AM

Ok thanks...but

So that means i would have to create seperate pages to run the actual cron job for each time execution?


#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 October 2006 - 07:58 AM

yep.

unless the exicuted page is the correct page that needs the database information.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 Neptunus Maris

Neptunus Maris
  • Members
  • PipPipPip
  • Advanced Member
  • 192 posts

Posted 27 October 2006 - 08:24 PM

Lets say i wanted to have 12 days...each day of those 12 are a month.  I want a code that changes the month everyday.

Could you possibly give me an example of hosw i would do that?


I was thinking of how to do but my brain exploded every time.



Neptune




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users