Jump to content
MakeWebGames

How To Do V1 Crons ( Hope This Will Help )


SoulOfDeath

Recommended Posts

I noticed Kraig needs help and that V1 are bit more harder to do than v2.

this is how you do them :

i uploaded them to my normal files not in the crons/are/not/4/u folder find it easier like this

First i renamed the hospital.php cron hospital1.php (as there are 2 hospital.php)

 

curl http://game-name/fedupdate.php 0 0 * * *

curl http://game-name/daysold.php 0 0 * * *

curl http://game-name/jobpay.php 1 7 * * *

curl http://game-name/orgcrime.php 0 * * * *

curl http://game-name/braveupdate.php */5 * * * *

curl http://game-name/enerwillupdate.php */5 * * * *

curl http://game-name/hospital1.php * * * * *

 

Hope this a help :-)

Please Contact me if anything is wrong also remember to upload them like a normal file for these instructions to work :wink:

~SoulOfDeath~

Link to comment
Share on other sites

Re: How To Do V1 Crons ( Hope This Will Help )

I found that doing it this way means that anyone can run your crons. You can password protect then by putting this code at the top:

if ($_GET['pass'] != 'Your_pass')
{
die("Go away");
}

Then in the crons table put ?pass=Your_pass

e.g.

http://game-name/daysold.php?pass=Your_pass

NOTE: Change the "Your_pass" to something else

Link to comment
Share on other sites

Re: How To Do V1 Crons ( Hope This Will Help )

 

I found that doing it this way means that anyone can run your crons. You can password protect then by putting this code at the top:

Code:

if ($_GET['pass'] != 'Your_pass')

{

die("Go away");

}

Then in the crons table put ?pass=Your_pass

e.g.

http://game-name/daysold.php?pass=Your_pass

NOTE: Change the "Your_pass" to something else

Another suggestion is moving the crons to a folder OUTSIDE of the public_html folder, this is so they cannot be accessed through a browser at all.

Link to comment
Share on other sites

Re: How To Do V1 Crons ( Hope This Will Help )

I agree, Rather make a folder outside public_html(www on some servers) and run it trough that.

 

I found that doing it this way means that anyone can run your crons. You can password protect then by putting this code at the top:

Code:

if ($_GET['pass'] != 'Your_pass')

{

die("Go away");

}

Then in the crons table put ?pass=Your_pass

e.g.

http://game-name/daysold.php?pass=Your_pass

NOTE: Change the "Your_pass" to something else

Another suggestion is moving the crons to a folder OUTSIDE of the public_html folder, this is so they cannot be accessed through a browser at all.

 

Link to comment
Share on other sites

Re: How To Do V1 Crons ( Hope This Will Help )

Of course you can. The scripts are located on the same server, the cron service runs on the same server, well to an extent that you would know.

So why not, I put my crons and my mysql details outside my public html folder so that noone can ever get to them unless they have my cpanel/ftp password. :)

You can still do what you like with them BUT you cannot access them via a browser, you can however include them in a php file which you save in public html and then view it in a browser

 

include "/home/cpanel username or whattever/cronjobsfolder/cron.php";

like so :)

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...