Cronjob Panel


Hellow people.
I am traing to setup a cron job but i cant in the panel.

in the input: 1000 characters)
Use full paths to files and programs.
I put:
crontab -e /home/USER/DOMAIN/script.php
and dont works.

Help please?


You only need the one line:


And then tell the panel how often you want it to run.



I am also struggling to set up a cron job, AsI could not see a user in CronJob panel, I have set up a user with bin/bash and selected shell account,(I really don’t know why, please tell me if it is right)
I went to control panel and inserted this
Is that right?
How would I know if it is working?
It does says Active though.


I’m not sure how you create the user with bin/bash, but the file path should be

user name is your FTP/Shell user. You can create them via DH panel --> Users --> Manage Users

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here



I have add this line to cronjob
and set the time to every hour but its not working. “is it the right syntax?”

any help here please.

I really do not know anything about cronjobs and the instructions available on DH are like German to me, All I want is to run this page every hour that it.



curl is like hitting it with a web browser. wget kinda does the same thing.



but still not working.

any more advice?



Try this:

/usr/bin/curl -s -o /dev/null

web design, development & seo by DigitalVibe


In addition, whenever i’m running a script via cron, I either dump the results to a log file (above the domain root - so in the user dir) or I use php’s mail() function to sned myself an email if something goes horribly wrong.

I’d build in error handling and event logging so you know exactly what’s going on when you run the script.


web design, development & seo by DigitalVibe


it worked.

May I suggest for folks like us there should be an option to select in CronJob panel what kind of cronjob are we would like to run. and just enter the URL.



That is possibly a great idea, although DH would need to leave it as an optional thing… there’s also so many different things you could use cron for, it might confuse people even more if they have loads of options and all variations of them, so it’s somehting GH would need to carefully plan out.

There’s also the fact that cron is covered in the wiki to a degree, and some people may say that you shouldn’t touch it if you don’t understand cron… others would argue that windows scheduled tasks make it easy enough, so why not do the same here… it’s DH’s call though, so you could poke them about it. I reckon you should email support with the suggestion… i’m not sure if they check these boards.


web design, development & seo by DigitalVibe


I agree with you.
but still when somebody go to Cronjob panel via GOODIES, it means they are there for a reason, so I am sure they could use some help there.

in my case I wanted a page to be visited every hour automatically so the site could be upated with latest RSS from other site, (I could visit the page my self but I had to be there every hour to click on that page link)
So I needed to setup something (a cronjob) where instead my server would visit that page for me.

Like you have said there could lots of things that a cronjob can do, but I am sure visiting page or maybe sending email are very basic cronjobs so these kind of cronjobs should be setup to help Noobs to get started.
The other complex cronjobs can be left out as they are complex and sure most of the expert would want to use those kind of jobs whould be able to get a idea from the basic cronjobs script to set their own.

I wish dh take these boards and act on common problems and suggestion, which their customers have posted here.


You can always add it to the Suggestion list in the Panel, but the Wiki would be a better place for cronjob recipes/examples.



I’m not sure why your cron job needs to revisit the page every hour. From what i understand, this can be done on an on-demand basis, with a cache.

On my site, I have a news section which caches the rss feeds for an hour from when they’re requested, and if other people request the same feed in that hour, it pulls it from the cache. If the cached version is over an hour old, the script will download the latest version from the server.

This saves the extra hourly load on the server and removes any unnecessary work - if your site isn’t viewed for a few hours, the server is still performing the work via cron, where as with the alternative option, it’s only being downloaded when people want to view it and if the cached version has expired.

I use a php script called “magpierss”, which handles all of what i’ve said automatically with a little bit of configuration.


web design, development & seo by DigitalVibe


I have a php file that has a simple code to send email to a mail id. the file sends mail whenever i visit it through web browser. now i want to put it in cronjob so that it sends mail every 30 minutes. i have written

30 * * * * /usr/local/bin/php /home/username/

as my cronjob entry. yet it is not sending me any mail. i have even added
#!/usr/local/bin/php -q

in my php file. am not getting any error mail also. plz help


Thanks for the comments.

I would be interested to know how you have set up your magpirss script.

bytheway I visited your site when I click on newsfeeds I got the error in FireFox.

"XML Parsing Error: not well-formed
Line Number 37, Column 454:

-------------------------------------------------------------------------------------------------- "

but it is OK in IE7.



Hijacking a slightly similar thread probably isn’t going to get you the response you want. Try posting this as a new thread.



Ah yeah thanks for that - i’ve been going over the site changing from HTML 4.01 to XHTML and need to clean up some php generated html. Cheers for the heads-up though :slight_smile:


web design, development & seo by DigitalVibe


As for the configuration, all i’ve done is the same as is in the htdocs/index.html file of the installation under the usage instructions section.

The only difference is that i’ve changed the cache folder to be above the document root so that people cannot access the cache publically.

Then in the page you’re calling the script from, put the following line before the include for rss_fetch

define('MAGPIE_CACHE_DIR', '/home/user/web_cache/');
with “user” being your username, and “web_cache” being the folder you want to cache items in.

That is all you should need. - You can then call the fetch_rss function with whatever url you desire.


web design, development & seo by DigitalVibe


first of all, SORRY I was away.

right, Thanks for the instruction.

I am not sure if you are familiar with Pligg,
I am actually using Pligg and I have installed a rss_importer module where the author even says to set up cronjob.

The thing you make sense to me. but will the fetch data would be stored on hte database for search in future?
I am still learning,
I could give it a try if could tell me which page exactly should have the
define(‘MAGPIE_CACHE_DIR’, ‘/home/user/web_cache/’);

and where to put the url to call the fetch_rss function.