Idiots guide to Cron jobs
06-18-04, 16:00
|
|
|---|---|
Dun Registered User Join: Jun 2004 Posts: 2 |
Idiots guide to Cron jobs I am trying to set up a cron job to run scheduler.php from this path (edited for security): /path/unixuser/pathto/engine/scheduler.php so what on earth do I need to put in the command and input to command boxes?
|
06-19-04, 02:50
|
|
|---|---|
hanskind Registered User Join: Jan 2003 Posts: 719 |
We run a php script from cron like this: 0 * * * * (nice -15 curl http://www.domain.com/subdir/maintenance/script.php) This will run the script daily, at midnight. Hope this helps rgds __________________ Hans Kind - The Dutchy FlyingServers International - Europe +31 592 40 96 12 Data Centers : AMS - LHR - ATL - ORD - SLC FlyingBackup, off-site & remote backup services Server Security, Managed Dedicated Servers, Monitoring Service ------------------------------------------- Wisdom is, only talk when you can improve the silence |
06-19-04, 04:58
|
||
|---|---|---|
Dun Registered User Join: Jun 2004 Posts: 2 |
Quote:
Appreciate your attempt at helping though
|
|
06-19-04, 05:46
|
|
|---|---|
hanskind Registered User Join: Jan 2003 Posts: 719 |
assuming you want this added trough the CP, into a user account cron joib, enter the follwing in the boxes: Enter 0 in the minute field: Enter a * in the Hour, Day of Month, Month and Day of Week fields. Enter the following line in the Command field: (nice -15 curl http://www.domain.com/subdir/maintenance/script.php) rgds __________________ Hans Kind - The Dutchy FlyingServers International - Europe +31 592 40 96 12 Data Centers : AMS - LHR - ATL - ORD - SLC FlyingBackup, off-site & remote backup services Server Security, Managed Dedicated Servers, Monitoring Service ------------------------------------------- Wisdom is, only talk when you can improve the silence |
06-24-04, 14:23
|
||
|---|---|---|
profitability Registered User Join: Aug 2002 Posts: 1,784 |
Quote:
0 0 * * * (nice -15 curl http://www.domain.com/subdir/maintenance/script.php) Andrew |
|
07-27-06, 16:39
|
|
|---|---|
rodrigo Registered User Join: Jan 2005 Posts: 258 |
Cron tab not running I have followed instructions posted on this thread and still my cron tab does not run. I have logged into the server and if I run: (nice -15 curl http://mydomai.com/myscript.php) from root it runs perfectly. But if I switch to a regular user, it returns: "Permission denied" We did some hardening on this server according to DynamicNet's instructions, so I wonder if that is causing the cron not to run because of lack of proper permissions. What user does the HSphere cron tab use? to check if it has proper permissions. Also, what is the diference on using: (nice -15 curl http://mydomai.com/myscript.php) and using: curl http://mydomai.com/myscript.php > /dev/null 2>&1 Thanks a lot for your help. Rodrigo __________________ Rodrigo Fernández Technical Support Edenia Systems International "Total Internet Services in Costa Rica" http://www.edenia.com http://www.crservers.com |
06-04-07, 00:18
|
|
|---|---|
ladylinux Registered User Join: Jul 2003 Posts: 9,777 |
Hello, Well in his case. I would bet that curl has permissions of 700 .. meaning it can only be executed as root. Now what are you seeing the permission issues with , what user are you running this as and what are the permissions of the binary in question. ?? Francesca __________________ "No Problems Only Solutions" We Provide Server Management, Security Hardening And Patch Management. Also Dedicated Servers, Colocation, VPS Servers And Hsphere Licenses. |
06-04-07, 00:28
|
|
|---|---|
ladylinux Registered User Join: Jul 2003 Posts: 9,777 |
Hello, Ok .. so you want to allow a certain subset of users to be allowed to run the php binary ??? BTW .. this is not really the right place to be talking about Hsphere stuff .. Francesca __________________ "No Problems Only Solutions" We Provide Server Management, Security Hardening And Patch Management. Also Dedicated Servers, Colocation, VPS Servers And Hsphere Licenses. |
« Previous Thread | Next Thread »
| Search this thread | Forum jump |
|---|---|
| Thread tools | Rating | Display modes |
|---|---|---|
|
Linear Mode
|