How to make a cronjob execute URL?
#1
How to make a cronjob execute URL?
Hey all. Ok so before using Sentora i was able to use cron jobs to execute a URL the example url is this.
"www.domain.com/admin.php?resetStats=afak12Dkas4412"

How ever sentora will not allow me to execute a url as it wants a path. so how can i execute my example above using a path because i need the $_GET['resetStats'] to be equal to whats above.

Before i was using CentOS Web Panel and that allowed execution of commends/url so if anyone can help me out here that would be great.
Reply
#2
RE: How to make a cronjob execute URL?
I believe you are looking for this: #491‍
Second post. Just use a small php file to call the URL you need to run and have the Sentora cron job set to read the custom_cron.php file.

If the cronjob file is on your server, hosted in your site, you do not need to run the URL part.
Your custom_cron.php (from post 2 in the above link) should look like this:
PHP Code:
<?php
include('admin.php?resetStats=afak12Dkas4412');
?>
And be placed inside your site's root folder (where the main index.php is located)
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
#3
RE: How to make a cronjob execute URL?
(03-08-2017, 11:50 AM)TGates Wrote: I believe you are looking for this: #491‍
Second post. Just use a small php file to call the URL you need to run and have the Sentora cron job set to read the custom_cron.php file.

If the cronjob file is on your server, hosted in your site, you do not need to run the URL part.
Your custom_cron.php (from post 2 in the above link) should look like this:
PHP Code:
<?php
include('admin.php?resetStats=afak12Dkas4412');
?>
And be placed inside your site's root folder (where the main index.php is located)

Yes but the reason there is such a long string of numbers is so people cant randomly guess what the code is to reset stats so if i simply have a php file called cronjobs.php and have "include('admin.php?resetStats=afak12Dkas4412');" inside the php file if anyone runs www.test.com/cronjobs.php in there browser they will reset all points wont they? I need a way for only the cronjob manager to run the script and no one else. Is this something that can be done?
Reply
#4
RE: How to make a cronjob execute URL?
Run it from the /public_html/ dir?
That's what i did.

My Sentora DemoMy GithubAuxio Github
Zentora themeS-Type themeCstyleX theme
flat-color-iconssmall-n-flat-icons

Sentora's development takes way too long, so i'm transitioning to HestiaCP.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
confused to make an decision please help nscloud 4 11 ,505 09-14-2018, 09:52 AM
Last Post: wormsunited
Make a change in httpd-vhost.conf whitewolf101 2 8 ,733 11-20-2017, 07:28 PM
Last Post: Me.B
How to make Sentora added domains use one name server in registrants zpusr 15 50 ,223 07-06-2017, 05:31 PM
Last Post: abi.atthas151

Forum Jump:


Users browsing this thread: 1 Guest(s)