Need some work done? Post a Project Today
Attention Scriptlance users, Scriptlance has been acquired by Freelancer.com! Find out more
We have Opencart Shopping Cart system and use a custom ORDER EXPORT program. We need an enhancement to the ORDER EXPORT program: The program adds orders to a orders.csv file.
1. Right now the program writes the orders to orders.csv. Edit it to write the orders to orders-holder.csv and also write the orders to orders-backup.csv as well, which we can clear manually as it grows.
2. To prevent concurrent writing to a file and the file getting corrupted, we need a file locking mechanism. i.e. if orders-holder.csv file is opened for writing, then if an order comes from another browser, then lock the file (orders-holder.csv), till the first write operation is completed, then unlock it for the second process.
3. Set cron job once an hour 50 minute) Lock orders-holder.csv file and copy (NOT append) orders-holder.csv to orders.csv. Clear out orders-holder.csv and unlock
Freelancer.com (formerly GetAFreelancer, Scriptlance and vWorker/Rentacoder) is the world's largest freelancing, outsourcing and crowdsourcing marketplace for small business. Hire freelancers to work in software, writing, data entry and design right through to engineering and the sciences, sales and marketing, and accounting & legal services.
Find freelance jobs and make money online! We have freelance coders, writers, programmers, designers, marketers and more. Getting the best web design, custom programming, professional writing or affordable marketing has never been easier!
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)