- Support
- Forums
- Extension Forums
- NS Pro Forum
- Suggestions & General Discussion
- How to configure cron job for self-directed automation
How to configure cron job for self-directed automation
- Chris Paschen
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
4 years 5 months ago #1
by Chris Paschen
How to configure cron job for self-directed automation was created by Chris Paschen
(sorry for all the questions ... hoping that maybe this will help others who are new get going as well)
I have my own server and want to run everything internally - including running via my own local cron job.
1) I've followed the instructions and completed the online form for a cron job with ID only, and it generated the ID
2) I've downloaded the file as indicated
However, I'm not finding exactly what I need to do next.
If I create a cron job as */10 * * * * ... and have it run the downloaded file via curl, will that make it work and run the processes every 10 minutes?
Do I need to do something with that ID that was generated (other than enter it in the field in the component where it is indicated)?
I have my own server and want to run everything internally - including running via my own local cron job.
1) I've followed the instructions and completed the online form for a cron job with ID only, and it generated the ID
2) I've downloaded the file as indicated
However, I'm not finding exactly what I need to do next.
If I create a cron job as */10 * * * * ... and have it run the downloaded file via curl, will that make it work and run the processes every 10 minutes?
Do I need to do something with that ID that was generated (other than enter it in the field in the component where it is indicated)?
The following user(s) said Thank You: Zoe Rebecca
Please Log in or Create an account to join the conversation.
- Christopher Mavros
- Offline
- Administrator
4 years 5 months ago #2
by Christopher Mavros
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic How to configure cron job for self-directed automation
Hello Chris and thank you very much for posting on our forum!
After creating the Cron Job key from our https://mavrosxristoforos.com/cron-job-key-generatorcron job key generator interface, and downloading the trigger script, you need to do the following steps:
1. Add the Cron Job key in your NS Pro Options.
2. Edit the trigger script at line 4 to trigger your website. You simply have to replace the placeholder URL with your own website.Please note that you need to write it exactly as you did in the cron job key generator interface, or else it won't work. For example, https://mavrosxristoforos.com (without a trailing slash) is not the same as https://mavrosxristoforos.com/ (with a trailing slash).
3. Create the cron job (as you already did). For other readers, you may need to ask your host to do that, or go to your hosting account control panel, (like cPanel, Plesk), go to Cron Jobs and create a new cron job according to the instructions. Again, if something is not clear, you should ask your host.
That's all.
Thanks again!
After creating the Cron Job key from our https://mavrosxristoforos.com/cron-job-key-generatorcron job key generator interface, and downloading the trigger script, you need to do the following steps:
1. Add the Cron Job key in your NS Pro Options.
2. Edit the trigger script at line 4 to trigger your website. You simply have to replace the placeholder URL with your own website.
$sites_array[] = 'http://yourwebsitehere.com';
3. Create the cron job (as you already did). For other readers, you may need to ask your host to do that, or go to your hosting account control panel, (like cPanel, Plesk), go to Cron Jobs and create a new cron job according to the instructions. Again, if something is not clear, you should ask your host.
That's all.
Thanks again!
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- Chris Paschen
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
4 years 5 months ago #3
by Chris Paschen
Replied by Chris Paschen on topic How to configure cron job for self-directed automation
Thanks. I'll give this a try and see how it works.
Please Log in or Create an account to join the conversation.
- Pablo
- Offline
- Junior Member
1 year 3 months ago #4
by Pablo
Replied by Pablo on topic How to configure cron job for self-directed automation
I'm trying to setup the cron job in my server.
Where to upload the file nspro_trigger_for_clients.php?
I tried to upload it to root folder. If I call it from a browser (for example https://mydomain.com/nspro_trigger_for_clients.php) and it shows nothing. White page.
Best regards
Where to upload the file nspro_trigger_for_clients.php?
I tried to upload it to root folder. If I call it from a browser (for example https://mydomain.com/nspro_trigger_for_clients.php) and it shows nothing. White page.
Best regards
Please Log in or Create an account to join the conversation.
- Christopher Mavros
- Offline
- Administrator
1 year 3 months ago #5
by Christopher Mavros
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Replied by Christopher Mavros on topic How to configure cron job for self-directed automation
Hello Pablo!
Thank you for posting on our forum!
You can upload the file wherever you want. Its functionality is not related to its directory.
Have you edited the file to include your site?
If yes, can you try to enable errors for your PHP and try again, to see if you get an error?
Thank you for posting on our forum!
You can upload the file wherever you want. Its functionality is not related to its directory.
Have you edited the file to include your site?
If yes, can you try to enable errors for your PHP and try again, to see if you get an error?
Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!
Please Log in or Create an account to join the conversation.
- Pablo
- Offline
- Junior Member
1 year 3 months ago #6
by Pablo
Replied by Pablo on topic How to configure cron job for self-directed automation
Perfect. I uploaded the file to root directory.
I have edited the file to include the site.
Here is PHP report enabling errors:
Warning: require(HTTP/Request2.php): Failed to open stream: No such file or directory in nspro_trigger_for_clients.php on line 18
Fatal error: Uncaught Error: Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/php') in nspro_trigger_for_clients.php:18 Stack trace: #0 {main} thrown in nspro_trigger_for_clients.php on line 18.
I removed absolute paths from the report.
Thank you!
I have edited the file to include the site.
Here is PHP report enabling errors:
Warning: require(HTTP/Request2.php): Failed to open stream: No such file or directory in nspro_trigger_for_clients.php on line 18
Fatal error: Uncaught Error: Failed opening required 'HTTP/Request2.php' (include_path='.:/usr/share/php') in nspro_trigger_for_clients.php:18 Stack trace: #0 {main} thrown in nspro_trigger_for_clients.php on line 18.
I removed absolute paths from the report.
Thank you!
Please Log in or Create an account to join the conversation.
Moderators: Christopher Mavros
- Home
- Support
- Forums
- Extension Forums
- NS Pro Forum
- Suggestions & General Discussion
- How to configure cron job for self-directed automation