Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello
I have a magento site. sometimes, import isnt completed, so in these cases products prices,images ect are not updated. Manually i have to check everyday, login into server, and go to the directory where import files are located, and if i dont find those files than start exporting again. My idea consists, on creating an automated process. Like an agent, who checks if imported files came and if not, than notify me, with a mail.
What would you suggest?
Posted
Updated 4-Dec-15 4:28am
v2
Comments
Suvendu Shekhar Giri 4-Dec-15 11:24am    
I would rather suggest to find the root cause of the problem.
Debug by importing less no of data and check if the same issue happens.
TaRoshka 5-Dec-15 6:04am    
Let me explain how it works. I have buit a script that executes the import. If the import is not done, this script tells me the reason why it happened. so i easily can isolate the problem from the back-end (if is the problem in the backend ).This system is integrated with Dynamic NAV, so i dont mess up with database,there is a service that gives me the data i want to export, and my script brings them into a temporary database, than a cron job updates this temporary database everyday. Even this part is easy for me to monitor the process, if an error happens.Now i need to automate further the system.The imported files have a path in server. suppose...import/archive/file1.txt...In those cases that import is not completed, than the import files are located....import/file1.txt. I have to create "an agent" who checks this path for me, if the txt files are located into the second path i provided.And in case it finds any file there, than notify me:"Hello, i have found that import has problems.... Lucky you..." :D

If I understand correctly, you want to automate a task that is still manual without messing with the system.
Which is in your case, checking the existence of files in a certain path.

That should be pretty easy.
Just create a script that checks the path and mails you if there are changes.
Then setup a cron to execute that script.

You said that you have a daily cron job.
I suggest setting up the new script to run after that.

It depends on what's available on your server to create the script.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900