I have created one category for displaying new arrivals and have added all items under this category. Now i need to delete old items (30 days old & 7 days old) from that category. This should happen daily and automatically.
You can achieve this by two methods.
you need to create a cron which will execute as per your required time frame and make the changes accordingly.
you can follow the following url to create a cron.
you need to create a observer which will execute on controller_action_predispatch event and makes the changes accordingly. for creating observer you can follow the following url.
Code to delete product from category
where 7 is the category id and 13409 is product id