| | |
Dynamic Cron job
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 523
Reputation:
Solved Threads: 61
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.
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
follow me on twitter
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.
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.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
•
•
Join Date: Sep 2009
Posts: 523
Reputation:
Solved Threads: 61
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
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
follow me on twitter
•
•
Join Date: Sep 2009
Posts: 523
Reputation:
Solved Threads: 61
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
follow me on twitter
•
•
Join Date: Sep 2009
Posts: 523
Reputation:
Solved Threads: 61
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
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
follow me on twitter
![]() |
Similar Threads
- Cron Job to back up directories (PHP)
- PHP reminder E-mail - Cron job to run the script (PHP)
- need help w/ CRON job for backups (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: Problem with time()
- Next Thread: About joomla,virtuemart,shipping??
| Thread Tools | Search this Thread |
#include 301 ad adult affiliate apache array background bitmap bmp broken c++ casino casmobi classified clean content craigslist cron database delete desktop developer development domain download dropdown duplicate dynamic dynamically earn ecommerce eshop file filter formatdecimal freelance function google graphics gridview headmethod home htaccess html image include internetmarketing java job lamp lead link listing marketing mediawiki memory menu mobile mod_rewrite money multidimensional multiple onlinecronjob php porn programs progressbar python random recursion redirect rss seekers sex stream string table url urllib2 web webmastertools whileloop wxpython







