[Skip to main content](#vessel-content)

#   \[RESOLVED\] Can the Cron delete the trigger file?

##

- **[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")**
- [![joyhanawa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40919-joyhanawa "View joyhanawa's Profile") Topic Author
- [ Offline](/forum/user/40919-joyhanawa)

Less More

- Posts: 36
- Thank you received: 1
-
-

10 years 6 months ago -  10 years 6 months ago [\#239491](#239491) by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")  *[\[RESOLVED\] Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239491 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")* was created by *[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")*

-- url of the page with the problem -- : htttp://www.safehomesreport.com
-- HikaShop version -- : 3.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.3
-- Browser(s) name and version -- : Chrome latest
-- Error-message(debug-mod must be tuned on) -- : No Error, question

I'm importing products using the import products automatically feature: [ www.hikashop.com/support/support/documen...hop-import.html#cron](http://www.hikashop.com/support/support/documentation/73-hikashop-import.html#cron)
I write the csv file with the new product information when the file is loaded.
Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.
[ www.hikashop.com/support/support/documen...ron-task.html#server](http://www.hikashop.com/support/support/documentation/55-hikashop-cron-task.html#server)

I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.

Last edit: 10 years 6 months ago by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile"). Reason: update subject

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

10 years 6 months ago -  10 years 6 months ago [\#239518](#239518) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239518 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Hi,

There is no option to do that.
That however sounds like a really good idea and is easy to add. Here is a new version of the plugin with that option.

*This attachment is hidden for guests.
Please log in or register to see it.*

Last edit: 10 years 6 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")**
- [![joyhanawa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40919-joyhanawa "View joyhanawa's Profile") Topic Author
- [ Offline](/forum/user/40919-joyhanawa)

Less More

- Posts: 36
- Thank you received: 1
-
-

10 years 6 months ago -  10 years 6 months ago [\#239589](#239589) by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")  Replied by *[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239589 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Thanks for the new code! I think I must be missing something.

I replaced my existing files in the /administrator/components/com_hikashop/extensions/plg_hikashop_datafeed directory and the /plugins/hikashop/datafeed directories.
I was able to change my setting in Hikashop - Product Cron Update
"DELETE_FILE_AFTER_IMPORT" to YES and I saved it, but it is not removing the file.

The Cron shows last run time 09:18, (one minute ago) and it has run 20 times since I made the change.
Do I need to clear cache?

Sorry, not sure what else I need to do to make this fix work.

Last edit: 10 years 6 months ago by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile"). Reason: Adding the cron report

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

10 years 6 months ago [\#239610](#239610) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239610 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Hi,

Try changing the line: Code:

if($url &amp;&amp; !empty($plugin-&gt;params['deletefile'])){

to:
Code:

if(!$url &amp;&amp; !empty($plugin-&gt;params['deletefile'])){

in the plugin php file and that should help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")**
- [![joyhanawa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40919-joyhanawa "View joyhanawa's Profile") Topic Author
- [ Offline](/forum/user/40919-joyhanawa)

Less More

- Posts: 36
- Thank you received: 1
-
-

10 years 6 months ago -  10 years 6 months ago [\#239633](#239633) by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")  Replied by *[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239633 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Hi Nicolas,
I added the ! but it isn't deleting the file.
Any ideas?

Last edit: 10 years 6 months ago by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile"). Reason: simplifying

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")**
- [![joyhanawa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40919-joyhanawa "View joyhanawa's Profile") Topic Author
- [ Offline](/forum/user/40919-joyhanawa)

Less More

- Posts: 36
- Thank you received: 1
-
-

10 years 6 months ago [\#239985](#239985) by [joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")  Replied by *[joyhanawa](/forum/user/40919-joyhanawa "View joyhanawa's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#239985 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Hi Nicolas,
I had to modify the code because my Joomla site is nested in a master domain the $path was not working. Here's my code... It works great! Thank you so much for adding this.
When you publish a new release can you modify the code to behave like this?

if(!$url &amp;&amp; !empty($plugin-&gt;params)){
$deletefilepath=JPATH_ROOT.DS.(str_replace(JURI::base(),'',$path));
unlink($deletefilepath);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 6 months ago [\#240239](#240239) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Can the Cron delete the trigger file?](/forum/37-import-export-csv-xls/884385-resolved-can-the-cron-delete-the-trigger-file#240239 "-- url of the page with the problem -- : htttp://www.safehomesreport.com -- HikaShop version -- : 3.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.3 -- Browser(s) name and version -- : Chrome latest -- Error-message(debug-mod must be tuned on) -- : No Error, question  I'm importing products using the import products automatically feature:   www.hikashop.com/support/support/documen...hop-import.html#cron  I write the csv file with the new product information when the file is loaded. Is there a way to delete the csv AFTER the cron runs? Otherwise my process runs the same record over and over and over.   www.hikashop.com/support/support/documen...ron-task.html#server  I check for new files frequently (2 times every 5 minutes), so removing the file would be helpful.")*

Hi,

We will test that code and see if we include it like that or not for the next version.
Thank you for this report.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84ODQzODUtcmVzb2x2ZWQtY2FuLXRoZS1jcm9uLWRlbGV0ZS10aGUtdHJpZ2dlci1maWxlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.105 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
