Crontab usage!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Crontab usage!

Post by Joe »

How can you tell if your server is allowed to use crontab?.

Joe 8)
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Check your control panel for a cron function or ask your host.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

It is actually a bit more complicated than that. I am fairly new to crontab and I am creating a cron job compiler with php which is going great, however I need a routine that will test to see if crontab is enabled.


Joe 8)
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Got shell access? I would guess so. Try:

Code: Select all

crontab -l
You'll get an error massage a long the lines of "You are not allowed to use cron." if you don't have access.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Ah ha. That is exactly what I required. Thanks mate!
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Man. This subject is becoming CRONic. ;)
Post Reply