cPanel beginner tutorial 10 – Cron Jobs

Published by admin on



In this tutorial I show you how to set up a cron job that will run a script on your site every few minute. You can also set cron jobs to run every hour, every day, once a week or once a year.

/* FILE PATHS

THIS WORKS
/usr/local/bin/php -q /home/yourCpanelUsername/public_html/filename.php

DIDNT TRY THIS
/usr/bin/php -q /home/yourCpanelUsername/public_html/filename.php

THIS DIDNT WORK FOR ME
/home/yourCpanelUsername/public_html/filename.php

*/

Playlist description
———————
In this tutorial series we’ll be learning how use the everyday tasks a web developer or webmaster needs to know. These tasks include managing files, MySQL databases, email accounts and more.

Links
———————
Visit this tutorial on my website: www.jozituts.com/

Follow Jozituts on social media:
facebook:
twitter:
youtube:

Follow my personal social media pages:
facebook:
twitter:
youtube:

source


28 Comments

Ashiq Muhammed · June 26, 2018 at 6:21 am

Thanks… This worked…. 🙂

Jorge Mendez · June 26, 2018 at 6:21 am

Not certain about the points made but ,if anyone else trying to find out how to learn ukulele try Cypouris Amazing Uke Coach ( search on google ) ? Ive heard some pretty good things about it and my colleague got amazing success with it.

Abed Achouak · June 26, 2018 at 6:21 am

interesting points ,if anyone else wants to discover how do you treat psoriasis try Nadazma Awesome Psoriasis Helper (Have a quick look on google cant remember the place now ) ? Ive heard some interesting things about it and my friend got great success with it.

Abdul Hakim Islam · June 26, 2018 at 6:21 am

interesting points ,if anyone else wants to learn about ukulele lessons online try Nadazma Ultra Uke Helper (do a google search ) ? Ive heard some interesting things about it and my m8 got great success with it.

Muhammad Nazreen · June 26, 2018 at 6:21 am

I'm not sure but ,if anyone else is searching for a cure for psoriasis try Nadazma Awesome Psoriasis Helper (Have a quick look on google cant remember the place now ) ? Ive heard some amazing things about it and my work buddy got amazing results with it.

Ali Ali · June 26, 2018 at 6:21 am

This is good

bhagat sarma · June 26, 2018 at 6:21 am

This video helped me a lot for configure my server that i rented from http://www.datasoft.ws
Please upload more videos.

Chirag Chauhan · June 26, 2018 at 6:21 am

Good

VINOTH KANNAN · June 26, 2018 at 6:21 am

very helpful

Sahar Tal · June 26, 2018 at 6:21 am

thanks 🙂

sankyeat · June 26, 2018 at 6:21 am

This entire series has been fantastic. No one else, that I could find anyway, has broken down the web hosting side of things as well as this. Well Done and please keep up the content for beginners! 🙂

Riddim Dubstep · June 26, 2018 at 6:21 am

For me worked like this:
php /home/user/public_html/trackname.php >/dev/null 2>&1

P.S. You can set cron jobs for less than one minute. Oh, well. There is a workaround for this.
Do 2 PHP functions and inside each other set an if clause for which you set a counter.
Then execute the second function from the first one and the first function from the second one.
When the if clause not met (if x < y for example) exit() the function.
Then set sleep() for every few seconds you want.
For example, set the if clause to 10 and sleep() to 6. If x is not < y then it exit(), else, it executes the if content.

MegaCrypter Tuto · June 26, 2018 at 6:21 am

Nice tutorial. Very helpful.

Shinerweb · June 26, 2018 at 6:21 am

Thanks

Eden Fesseha · June 26, 2018 at 6:21 am

I found the video helpful. Thanks !

The Castiel · June 26, 2018 at 6:21 am

05:01 maybe this will wor……give executable permission to your php script and
use the below line into your top of the php script
#!/usr/local/bin/php -q

Tanvir Ahmed Shaon · June 26, 2018 at 6:21 am

Nice tutorial. Very helpful.

vinod sahare · June 26, 2018 at 6:21 am

very good tutorial

Video Maker · June 26, 2018 at 6:21 am

great work can you tell me its working once per minute when i am changing it into once per day and giving custom time it is not working please can you tell .

cihangir ' · June 26, 2018 at 6:21 am

YAYAYAYAY

Shubham Khuva · June 26, 2018 at 6:21 am

Its Working for me in cPanel Cron Jobs
wget http://site_name/file_location.php

Furkan keskin · June 26, 2018 at 6:21 am

thank you so much

Website Designer · June 26, 2018 at 6:21 am

Hi, its working thank you so much.

Niraj Karhe · June 26, 2018 at 6:21 am

What to do if Cron Job is not present in Hosting Panel ??

Arsalan Ajmal · June 26, 2018 at 6:21 am

Thank you very much. It saved my time

Jacques Nyilinkindi · June 26, 2018 at 6:21 am

Thanks really useful,!

Shivam Verma · June 26, 2018 at 6:21 am

I like this man… Seriously That is the Kind of Tutorial that I need the most.

Boss6201 · June 26, 2018 at 6:21 am

Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

en_USEnglish
en_USEnglish
%d bloggers like this: