This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

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
Thanks given by:
#2
RE: How to make a cronjob execute URL?
I believe you are looking for this: Proper CRON setup
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
Thanks given by:
#3
RE: How to make a cronjob execute URL?
(03-08-2017, 11:50 AM)TGates Wrote: I believe you are looking for this: Proper CRON setup
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
Thanks given by:
#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
Thanks given by:


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

Forum Jump:


Users browsing this thread: 1 Guest(s)