Jump to content

[SOLVED] how do I setup a CRON Rule


cerberus22

Recommended Posts

Hi All,

I am trying to setup the "Birthday Present" module,

it says I need to set up a CRON Rule which calls the file /home/speedmot/public_html/no2/modules/birthdaypresent/cron.php everyday

What is a CRON Rule and how do I set one up ??

All the best,
Cerberus22

Link to comment
Share on other sites

Hi Whitelighter,

Thanks for pointing me in the right direction.

So far I have managed to set it up to run every 24 hours, if using cpanel for your server it seems to be quite simple to do, you just need to get the path correct.


all the best,
cerberus22

Link to comment
Share on other sites

UPDATE

You need tp put php in front of the cron rule to make it work on cpanel

The birthday present said "I need to set up a CRON Rule which calls the file /home/speedmot/public_html/no2/modules/birthdaypresent/cron.php everyday "

SO you need to run this to get it to work : php/home/speedmot/public_html/no2/modules/birthdaypresent/cron.php

(you can get your file path from the birthday present module, just remember to add the php at the front)


All the best,
Cerberus22

Link to comment
Share on other sites

  • 7 months later...
  • 1 month later...
UPDATE

You need tp put php in front of the cron rule to make it work on cpanel

The birthday present said "I need to set up a CRON Rule which calls the file /home/speedmot/public_html/no2/modules/birthdaypresent/cron.php everyday "

SO you need to run this to get it to work : php/home/speedmot/public_html/no2/modules/birthdaypresent/cron.php

(you can get your file path from the birthday present module, just remember to add the php at the front)


All the best,
Cerberus22

I made everything this but not getting any messages (I am the test client). What else should I do?
Grateful.
Link to comment
Share on other sites

putting php in front doesn't mean attach the word php at the start....

crontab let you execute a command in shell
"/home/speedmot/public_html/no2/modules/birthdaypresent/cron.php" is not a command, it's a file name

"php/home/speedmot/public_html/no2/modules/birthdaypresent/cron.php" is also not a command, but an incorrect filename.

The proper way to run it is:
"/usr/bin/php -q /full/path/to/your/php/script"

"/usr/bin/php" tells cron that we want php to run a file.
"-q" tell it to ignore the http headers (they are not needed back in the crob file

Link to comment
Share on other sites

Unfortunately I must say I did not understand anything. How would this command with the following rule that appears in prestashop?
/home/prestashop/public_html/modules/birthdaypresent/cron.php
Thank you,


/usr/bin/php -q /home/prestashop/public_html/modules/birthdaypresent/cron.php
Link to comment
Share on other sites

  • 2 months later...

Hmmmn I have my cron set to run every day and via cPanel have it email me each time it runs and not yet have I once had a birthday mail sent.

I get a mail everyday to my admin address that just says OK.

I have created something in the region of 50 test users now, each with a birthday set as the following day.

Looking at the number of posts referring to birthdaypresent/cron.php and seemingly no answers is this a bug within the cron.php file?

Does this Birthday Present module actually work for anyone?

Link to comment
Share on other sites

  • 2 weeks later...
Hmmmn I have my cron set to run every day and via cPanel have it email me each time it runs and not yet have I once had a birthday mail sent.

I get a mail everyday to my admin address that just says OK.

I have created something in the region of 50 test users now, each with a birthday set as the following day.

Looking at the number of posts referring to birthdaypresent/cron.php and seemingly no answers is this a bug within the cron.php file?

Does this Birthday Present module actually work for anyone?

Hehehehe, this module works when it wants and the way he (the module) you want. I installed the module, it sends messages to customers, but have not figured out what criteria it uses for this. But have not figured out what criteria it uses for this, is that it sends customer, customer must not send.
But see if you do not have any bonus birthday listed in the tab Payments / coupons
Hugs,
Link to comment
Share on other sites

Hi Roberta,

Thanks for your post, it is reassuring to know that someone has this module working.

I do have the voucher set up in Payments > Vouchers for the Birthday module but it did have a duplicate so I have removed one. I'll set up a new test client today with a fictitious birthday for tomorrow and see if they get a Birthday voucher.

Thanks again,

Steve.

EDIT: Further - It still didn't work :o( I have noticed that the file permissions for cron.php were unticked in all cases for 'execute' so I've set them to executable and see if that's what preventing things working.

Link to comment
Share on other sites

  • 1 month later...

I cannot get this working, this is what I've done so far in case anyone sees i missed something...

1. Have 777 file permissions on the cron.php file
2. Have the Cron path set to "/usr/bin/php -q /home/goldgal/public_html/modules/birthdaypresent/cron.php"
3. Received an e-mail with "Birthday present not active". I take it that this is not working by this message......, but you never know with some of these modules ;-)

Link to comment
Share on other sites

  • 3 months later...
  • 5 months later...
  • 4 months later...
  • 1 year later...

To setup a CRON Rule

 

Go to your hosting account and find Cron job manager, I'm using godaddy.com host and its under My account - Hosting - then Lanch your hosting,

 

go to tub Content, first line Cron job manager, after you in, push the button Create Cron Job,

 

then give a name for Cron job title: for example "Birthday Schedule" then for the Command: click Browse,

 

window will popup, in left column find modules, click on it, on the right window look for the file cron.php,

 

probably you will not find it because it in diferent directory,

so go to your FTP manager, in your root directory go to modules or watever is stored,

find birthdaypresent module, open it, find cron.php file and copy in to module folder, BUT COPY NOT TRANSFER.

 

Go back to your host browse again, go to module/cron.php and hit select and there you go.

You can set up time, month and days manualy.

You good to go.

Hope that helps.

Link to comment
Share on other sites

  • 3 years later...
Guest locen

Hi, what should be the syntax for cron job? 


I migrated my shop to another server, now domain point to the new server but probably i setted wrong cronjob. can someone help me? 


If i follow standard rules like this "home/username/public_html/cron.php" i receive this--> No such file or directory


 


Please help 


thanks  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...