News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Cron job to scan download folder

Started by DylanStr, 21.04.2016 14:22:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DylanStr

Hello all

I have everything running well but there is one problem, i cant get a cron job to work for scanning my downloads folder.

I have a website with 2 download catagories. Each catagory has +/- 10.000 pdf files in it.

I have set auto monitoring to off, because i was told that was better with this amount of downloads. Every night a folder on another server where the pdf's are placed, is synchronized with my jdownloads folder. So that goes fully automatic. Now i want to set a cron job to scan my jdownloads to be able to automaticly publish the downloads, also at night ( like 2 hours later than the folder sync ) I have tried to do it with XTCronjob, but it gives an error. Is there a good way to do this? There must be someone here that has the same situation as me i guess.

I hope someone can help :)


Dylan
  •  

ColinM

Hi
First you can set the Downloads to be automatically published. It is in Monitoring Tab in Automatically publish Downloads? field. So that will help with any more Downloads.

I am not too familiar myself with Cron jobs . You could select a large number of Downloads in the Backend and Publish there.  Or if you are familar with SQL you could do it directly in phpMyAdmin.

Colin
Colin M
  •  

DylanStr

Yes the option to automaticly publish is already active. But now i still need to scan for new files manually in the backend. I red somehwere that i need a cron job for the scan.php file. But i am completely new to linux, joomla, php etc. so i dont know how to do it yet. But this is the only problem i have left. I am ready to go live with my website but i need everything related to adding downloads go fully automatic. I didnt manage to do it this way: http://www.jdownloads.net/documentations/item/exists-a-automatic-publication-solution

Maybe someone can do an update to see if this still works? Maybe i am doing something wrong  :P

Dylan
  •  

ColinM

Hi
If you are using  JPrc Cron please note it is not a 'true' cron job that is initiated by the web server.  It relies on users visiting your site which is not normally happening if you do not  have a publicly available site.  Suppose you have set up  JPrc Cron to run at 4:00am then it will run when the first visitor after 4:00 goes to your site.

Colin
Colin M
  •  

DylanStr

Hmm... Ok. I didn't know that. So what I need is a real cron job to run on the time I set it to. There must be a way to do it.
  •  

ColinM

#5
Hi
I expect to have a new document on cron jobs tomorrow.
Does your host site have cPanel? And if yes are you familiar with it?
Colin

EDIT see http://www.jdownloads.net/documentations/item/automatic-publicationat-scheduled-times?category_id=30
Colin M
  •  

DylanStr

Thanks for your message Colin.

I managed to do a succesful Cron job with XTCronjob wednesday.

So I think it works ok now :)

I don't have cPanel as far as I know. The article is written very well, thanks for that :)

Dylan
  •