HElP Me I need Run Cron Jobs

devinda

Power Member
Joined
Mar 26, 2008
Messages
780
Reaction score
165
I need a run Cron Jobs Please help me

How do i do this and get rid of it every six hours and after extract . zip file

--------------

File Path Delete Cache Folder
public_html/news/cache

Then after delete cache folder and run

Files to extract:
/public_html/news/cache.zip
 
have any one?
 
I need a run Cron Jobs Please help me

How do i do this and get rid of it every six hours and after extract . zip file

--------------

File Path Delete Cache Folder
public_html/news/cache

Then after delete cache folder and run

Files to extract:
/public_html/news/cache.zip
First off, what operating system is it? Assuming it is to be linux, you need to edit the cron job file..

type
crontab -e
Select the editor (nano is always the easiest) if you are doing this for the first time..

make a new line in the file

Then write something like

0 */6 * * * php /path/to/your/cron/job/file

/path/to/your/cron/job/file is the absolute path of your file.
Also, don't try to write any logic in the crontab itself. Make it in a (php/python/anything else) script, and run it throught the cron job. Write your logic in the script itself.

Bonus tip: Always use https://crontab.guru/ to figure out the time, if you don't know what to write yourself.

P.s. It looks like you are trying to do something very stupid lol (no offense sorry). There might be a better way to do what you are doing. If you provide us more details, we can help you better.
 
First off, what operating system is it? Assuming it is to be linux, you need to edit the cron job file..

type
crontab -e
Select the editor (nano is always the easiest) if you are doing this for the first time..

make a new line in the file

Then write something like

0 */6 * * * php /path/to/your/cron/job/file

/path/to/your/cron/job/file is the absolute path of your file.
Also, don't try to write any logic in the crontab itself. Make it in a (php/python/anything else) script, and run it throught the cron job. Write your logic in the script itself.

Bonus tip: Always use https://crontab.guru/ to figure out the time, if you don't know what to write yourself.

Thanks Dear Im Using Cpanel
 
Thanks Dear Im Using Cpanel
Cpanel is just a script, not an operating system. It's probably linux. What I gave you should work with cpanel as well. I didn't use cpanel for a long time, so I don't know which menu it was. It was named something like "cron jobs". Search for it in the panel. You won't need the crontab -e command. Follow the rest after that.
 
0 */6 * * * script.sh

Code:
rm -rf /public_html/news/cache
unzip  /public_html/news/cache.zip
 
Back
Top