Dynamic Cron job

Thread Solved

Join Date: Sep 2009
Posts: 523
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 61
network18 network18 is offline Offline
Posting Pro

Dynamic Cron job

 
0
  #1
34 Days Ago
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.
"The discipline of writing something down is the first step towards making it happen."

follow me on twitter
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso
 
1
  #2
34 Days Ago
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.
Google is your friend.

Use [code] tags.

If you have found a solution to your problem, please mark the thread as SOLVED.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 523
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 61
network18 network18 is offline Offline
Posting Pro
 
0
  #3
34 Days Ago
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
"The discipline of writing something down is the first step towards making it happen."

follow me on twitter
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 523
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 61
network18 network18 is offline Offline
Posting Pro
 
0
  #4
34 Days Ago
just got something like 'php GetOpt package' but is there anything simpler than it?
"The discipline of writing something down is the first step towards making it happen."

follow me on twitter
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 523
Reputation: network18 is an unknown quantity at this point 
Solved Threads: 61
network18 network18 is offline Offline
Posting Pro
 
0
  #5
32 Days Ago
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
"The discipline of writing something down is the first step towards making it happen."

follow me on twitter
Reply With Quote Quick reply to this message  
Reply

Tags
cron, dynamic, job, url

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC