nutnkssr15 0 Posted November 12 (edited) Hey guys, I have a script which ideally i'd like to run every 5 minutes. The script basically connects to MySQL database, changes some ID's and thats it... But to save me from having to do it every time a customer places an order, i'd like something that would run the script for me, every 5 minutes. I'm not familiar with cron jobs which someone suggested so i was just wondering if anyone could help me out here with some in-depth information? or as a colleague most lightly puts it a "Dummy guide to ease database management". The script i run is currently in a .php file which i have bookmarked on my FireFox bar, and everytime i recieve an email, i click that button and it'll update the ID's.. but obviously over x-mas, when i'm not here, ill or whatever else and i dont run the script, it will generate a security issue so it's very important the script is run every 5 minutes atleast. Thanks in advance! Edited November 12 by burt remove SPAM Share this post Link to post Share on other sites
♥Dan Cole 493 Posted November 12 I don't know if it's appropriate for your application or not but you could always trigger it on a page call...ie someone visits one of your store pages and the call gets executed. Dan 1 burt reacted to this Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Share this post Link to post Share on other sites
♥JcMagpie 1,435 Posted November 12 (edited) Google is your best friend, https://crontab.guru/every-5-minutes Edit your cronjob file by running crontab -e command Add the following line for an every-5-minutes interval. */5 * * * * /path/to/script-or-program Save the file, and that is it. However before you do this talk to your host as they normaly do not like Cron that run so often Edited November 12 by JcMagpie Share this post Link to post Share on other sites
burt 3,851 Posted November 12 (edited) 42 minutes ago, Dan Cole said: I don't know if it's appropriate for your application or not but you could always trigger it on a page call...ie someone visits one of your store pages and the call gets executed. Dan This is the way to go. If something needs to happen every time an order is placed...why not do it as (eg) a checkout_success mod. EDIT: I have just noticed that the OP is a spammer. I have removed the hidden spam link, booted from the community - will leave the thread up as it's actually an interesting question. Edited November 12 by burt This is a signature that appears on all my posts. IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS Get the latest Responsive osCommerce CE (community edition) here Share this post Link to post Share on other sites