944,179 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 2249
  • PHP RSS
Oct 24th, 2009
0

Dynamic Cron job

Expand Post »
my api parsing script has dynamic url, like
scriptname.php?limit=100
here this last 100 will change;varying from 0 to the number of lines from the file returned by first cron.
And i want to this script to execute as a cron job, but how this parameter 'limit' i should handle.
any posts regarding this dynamic cron url will be much appreciated.
Please ask to clarify if not clear enough.
Similar Threads
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
network18 is offline Offline
616 posts
since Sep 2009
Oct 24th, 2009
1
Re: Dynamic Cron job
You can't pass url parameters to a php script through cron.

If you need to store something to be used in a cronjob later, your best bet would be either to use a database or a text file.
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 2007
Oct 24th, 2009
0
Re: Dynamic Cron job
yes, i am aware of it, but i need to tackle this situation in some way.
I am getting some feeling that it will work that way,about your suggestion for using another text file, for storing what is to be used in the cron url.
can you elaborate it further
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
network18 is offline Offline
616 posts
since Sep 2009
Oct 24th, 2009
0
Re: Dynamic Cron job
just got something like 'php GetOpt package' but is there anything simpler than it?
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
network18 is offline Offline
616 posts
since Sep 2009
Oct 26th, 2009
0
Re: Dynamic Cron job
thanks kkeith29, now i did the same.
simply created a table which will have all the id/line numbers after insert done by the script.
So i dont need to pass the parameter in the url anymore and the script is cron compatible too.
closing the thread.thanks again
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
network18 is offline Offline
616 posts
since Sep 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Problem with time()
Next Thread in PHP Forum Timeline: About joomla,virtuemart,shipping??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC