Jump to content

Recommended Posts

OK i have tried this a few times and have seached google an nothing seams to work..

 

So..

i have a php script and it sends me a test email woohoo..

 

now i wanted the test email to be sent to me every hour (this was to test the cron)..

 

so i loaded up cPanel did the following. (typed this as a step by step)

 

1. clicked Cron jobs (icon)

Cron Jobs

Please choose your experience level:

  • Standard
    Advanced

2. click standard

3. i says Entry 1 and it asks for

Minute(s): i set 15

Hour(s): i set Every Hour

Day(s): i set every day

Months(s): i set every month

Weekday(s):  i set every weekday

 

4. Command to run:

i tried a few

php /home/prefix/public_html/test.php

php /home/prefix/public_html/test.php > /dev/null

/bin/php /home/prefix/public_html/test.php

 

5. click save

Cron Updated!

 

6. go back in and see Entry 1

 

wait hours even and nothing!!

 

anyone know what i am doing wrong!

 

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/
Share on other sites

I had hassle previously with a third party webserver, and cron not sending emails. Cron or my user acc etc. couldnt send an email.

 

In the end, I had to get cron to call the php script using wget :(  Not ideal, but it worked. So the line in cron would be:

wget http://www.website.com/~prefix/test.php

 

You may/maynot have to specify the full path to wget.

 

Rgds,

Steve

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-253649
Share on other sites

OMFG!!!!

 

looking at the spec of the basic aka mini package..

Instant Account Activation!
24/7 Support & 24/7 Live Support!
No Ads
FTP, PHP, MySQL
Unlimited MySQL Databases!
Unlimited Parked Domains / Subdomains
PHP with Safe-Mode Disabled [View phpinfo]
Unlimited POP3, SMTP, IMAP, WebMail
Powerful Spam Filtering
Custom Error Documents
Custom MX Records
No File Size or Type Limits
All Legal Content Allowed
Priority Support! 

 

now look at the

spec of the WHM (the one i have)

Set your own space, bandwidth and resource limits
Unlimited features (MySQL, FTP, Domains etc..)
PHP, MySQL, CGI, PERL, SSI
Unlimited MySQL Databases!
Unlimited Domains / Subdomains
Unlimited FTP Accounts
Protected Directories (.htaccess)
Fantastico Auto Installer
PHP with Safe-Mode Disabled [View phpinfo]
Frontpage Extensions
Optional Hotlink Protection
Unlimited POP3, SMTP, IMAP, WebMail
Powerful Spam Filtering
Website Statistics / Access Logs
Custom Error Documents
Custom MX Records
Cron Jobs
No File Size or Type Limits
All Legal Content Allowed
cPanel Control Panel
Plus many other cPanel functions!

 

 

NOW you see the Cron Jobs.. well i submitted a ticket see below..

 

my ticket

~Sighs~

i have been trying to add a crontab to my site, i have a php sctipt that emails me a report.. for whatever reason the job doesn't seam to be saving..

i have check the commands are valid but not sure if their valid on this server..

i have tryed

wget http://#####/test.php

curl http://#######/test.php

php /home/####/public_html/test.php

php -q /home/#####/public_html/test.php

bin/php /home/#####/public_html/test.php

 

each time i get

Cron Updated! but nothing happens

 

any suggestions

 

 

reply

Cron is not allowed unless you have a good reason for needing it.

 

I am NOT HAPPY..

 

suggections...

 

revenge one will be fine

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-253759
Share on other sites

OK if your still reading this then thank you..

 

my next step is moving..

 

The Problem..

i have registered a few domains.. and when i registered i you get this message (see below)

Domain Registration - Purchase Domain

 

 

You are about to purchase the domain NotHappy.co.uk

The cost of this domain is $8.65 per year.

UK Domains have a minimum 2 year registration period.

 

Important Information

Please check carefully the above domain name is correct and that there is no spelling mistakes.

All domain purchases are final. Domains cannot be refunded, cancelled, exchanged, renamed or transferred.

By clicking the Purchase Domain button below the domain will be entered into our system for registration there is no going back after this point.

 

so i have 2 years to wait on one.. and months of the others.. now should i push for getting them released (cancelled/exchanged) so i can uses them on another site ?

 

as far as i am aware they have broken the law

 

Trade Descriptions Act 1968

The Act also makes it a criminal offence:

  • to make a statement which is known to be false or misleading
  • recklessly to make a statement which is false or misleading as to any of the following matters:

 

  • the provision of services accommodation or facilities
  • the nature of any services, accommodation or facilities provided
  • the time at which, manner in which or persons by whom any services, accommodation or facilities so provided
  • the examination, approval or evaluation by any person of any services, accommodation or facilities so provided
  • the location or amenities of any accommodation so provided

 

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-253822
Share on other sites

they might not have broken the law if you agreed to those terms

I think he means that they broke the law by saying (writing on their page) he would have cron jobs, then when he tries to make a cron job they tell him that he needs some sort of special privileges in order to setup a cron job. I.e. "to make a statement which is known to be false or misleading".

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-253828
Share on other sites

OK well a little update

 

while looking for another host i am try to see if i can use them for awhile longer

 

my reply

well I need it for part of the system i am writing..

it will for file/mysql cleanups

email reporting

and a queue for uploaded job's

 

their responce

Is there not any way else to do this, cron should be used as a last resort.

Usually the way its done is to use a timestamp stored in the database and when a visitor goes to your site if more then X time has passed then you run your code and update the database.

 

Either way, the minumum cron time will be 3 hours.

 

OK this is c**p 3 hours is that to setup or intervals!!

 

any suggections for a good responce..

i dont'  want to play the false advertising card yet

 

as a note my site is something that gets used weekly (rarely daily) but at the end of the month a lot of data is uploaded and it processes a lot of reports..

 

i wanted the cron to be every 15/30 minutes 97% of the time it will just check the database for the job list and do nothing!

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-253851
Share on other sites

Well posted

 

Cron jobs should not be used as a last resort, but as a tool. When I signed up for your hosting services you had CronJobs listed as a feature. Since I am paying for this I would like to use it no matter if you think that it is a last resort or not.

 

We're see what happens thanks guys

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-254106
Share on other sites

Kinda hit solved to soon

got another responce

 

Cron Jobs are only available if you can prove that there is no other way for you to do what the cron is trying to do.

Cron Jobs are a thing of the past. They cause a TON of server abuse and if it was a free for all then the server would not be stable.

 

How are they "a thing of the past" ?

 

anyone

 

i understand the abuse part..

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-258067
Share on other sites

Cool is that a new addition ? (unsolved that is)

 

in anycase i am going to list my reasons. but also note i shouldn't have to justify them as its not in any agreement..

 

bunch of fools.. indeed

 

anyone know how cron can be claessed as "a thing of the past" is their something new i have missed!

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-258260
Share on other sites

thanks Daniel that gave me a kick

 

my replie

 

How is cronjob a thing of the past.

And how can i prove that there is no other option?

Cron is designed specifically to run a job at a specific interval and is IMO the best way to do it in Unix/Linux.

 

I have a mini account (without cronjobs) i paid for a WHM account mainly because i needed croning..

 

if you will not provide it them i request my domains be moved to another service provider of my choosing, because without them my site can not function the way i planned..

 

I registered the domains here because you fitted the requirements.. if your now saying you don't i wish to move..

Link to comment
https://forums.phpfreaks.com/topic/51485-crontab-cpanel/#findComment-258292
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.