Add cronjob command line |
Hi
Can i add cronjob with php? example shell_exec("crontab * * * * a.php"); Thanks
I use a bash script which, on many Linux servers are located at /etc/cron.d/
Code: #!/bin/sh The stuff between the curly brackets needs to be supplied by you. Basically you change directory to where the CI index.php is and then run PHP using the command shown. Substitute the actual controller's and the method's names. The command in the cron job will be something along these lines Code: /etc/cron.d/{name of bash script}
(10-31-2019, 12:22 PM)dave friend Wrote: I use a bash script which, on many Linux servers are located at /etc/cron.d/ Thank you Can i use this in Shared Host(Linux)? (10-31-2019, 12:22 PM)dave friend Wrote: I use a bash script which, on many Linux servers are located at /etc/cron.d/I have access to crontab command but cannot create new job
If you cannot create a new job then they have locked you out. Not unreasonable because great mischief is possible.
Does the ISP provide a C-Panel where you can schedule jobs? That's pretty typical for shared hosting. They do often limit what you can accomplish though.
(10-31-2019, 04:43 PM)dave friend Wrote: If you cannot create a new job then they have locked you out. Not unreasonable because great mischief is possible.No provide I think if i use the online Cronjob services,my problem will be solved Thanks
Hi guys
This library is for mange cronjob Please download and use it and if it's possible,develop it |
Welcome Guest, Not a member yet? Register Sign In |