Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Notifications
Clear all

Cron

7 Posts
2 Users
0 Reactions
11.5 K Views
 imen
(@imenkolsi)
Posts: 37
Active Member
Topic starter
 
[#1026]

Hi again,

This time i'm asking you about how to make the cron works you already have this functionality in the admin section

and the cron in files/cron/index.php

I have a script that i needed to be executed every 24 hours

could you help me or tell me the steps to make it work

thanks in advance


 
Posted : 15 Mar 2013 16H16
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Hi,

Cron script is not designed to include self scripts.
You must extend cron script to get you own.
It is not /cron/index.php
It is /model/Cron.php
Have a look at run() method, it runs two functions : checkDates() and checkImport()


 
Posted : 15 Mar 2013 20H03
 imen
(@imenkolsi)
Posts: 37
Active Member
Topic starter
 

where are the function that your are talking about because in file/cron/index.php it doesn't have anything


 
Posted : 15 Mar 2013 20H08
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

It is /model/Cron.php


 
Posted : 15 Mar 2013 20H15
 imen
(@imenkolsi)
Posts: 37
Active Member
Topic starter
 

So if i did understand correctly the model/cron.php will execute the script that i would declare in the files/cron/index.php this way:

<?php
header('Location: ...////link to my script ');

is this correct ?


 
Posted : 15 Mar 2013 21H27
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

Not at all :S

You have to develop your own code to adapt /model/Cron.php
There is nothing automatic.

I don't know where you got the idea to put some parameter in index.php : it is a defaut page to assure that even if your apache configuration is wrong, no direct web acces to the folder is allowed.


 
Posted : 16 Mar 2013 2H15
 imen
(@imenkolsi)
Posts: 37
Active Member
Topic starter
 

Alright then
thanks 🙂


 
Posted : 16 Mar 2013 7H11
Share:

Scroll to Top