0

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.

2
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by network18
1

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.

0

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

0

just got something like 'php GetOpt package' but is there anything simpler than it?

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.