Cron Job not working with codeigniter - cron

Cron job not working in cpanel in the codeigniter
Here is my command line I couldn't get the error. It is a function to sent email. That function not working don't sent mail, the cron not calling the function. I don't know what's happening.
wget -O - -q -t 1 http://example.com/project/Controller/function

Related

How do I make AcySms manual cron job in cPanel work?

When setting up AcySMS, there are few option for the cron job. "Web cron" runs at the fastest interval of 15 minutes, way too slow for me.
I have opted for "manual cron", and am given the following "cron URL" https://www.followmetrading.com/index.php?option=com_acysms&ctrl=cron
Putting that into the cPanel cron job manager just leaves me with an error everytime the cron attempts to run:
/usr/local/cpanel/bin/jailshell: http://www.followmetrading.com/index.php?option=com_acysms: No such file or directory
I have discovered that the following command executes the script properly.
curl --request GET 'https://www.followmetrading.com/index.php?option=com_acysms&ctrl=cron&no_html=1' >/dev/null 2>&1
Note: ensure the URL is surrounded by ' ' otherwise it seems to miss everything from the & onward.
Note: >/dev/null 2>&1 makes sure there is no email trail.

Bash Script Cron Job

I have installed PCoIP Teradici PCoIP Solutions for linux in Centos 6.4. I want to get macAdress of HostCard,
when i run pcoip_agent -info it gives correct output using command line. I want make this cron job, for that purpose i write bash script
#!/bin/bash
hostcardMacAddress=$(pcoip_agent --info|grep -F 'PCoIP Host card MAC:'|awk '{print $5}' > hostcardMacAddress.txt)
cat hostcardMacAddress.txt
after that i make this script a cron job but it gives empty macAddress.
Kindly help me. Thanks.
Check the mail of the user that owns the cron job. There will be an error message indicating what the issue is.
Login as cron-job's user
enter mail and check for mail at the time the cron job was invoked.

FeedWordPress cron job code

FeedWordPress (RSS fetcher) plugin of WordPress is working well, but it doesn't have an option to update RSS every 5 minutes (default is 60 minutes) so the only way is clicking the UPDATE NOW button manually.
I am new and some guys told me to trigger it every 5 minutes using a cron job, so I tried that in cpanel
First I tried this
curl http://domain.com/?update_feedwordpress=true > dev/null
but was getting this error
/bin/sh: dev/null: No such file or directory
Second I tried this
wget http://domain.com/?update_feedwordpress=1
but now I'm getting this error
/bin/sh: /usr/bin/wget: Permission denied
(I used my domain.com in that place)
Any correct/exact working code?
You can use this code:
/usr/local/bin/curl --silent -L "http://example.com/?update_feedwordpress=1" >/dev/null 2>&1
where you should replace example.com with your domain name.
Null device is /dev/null
The /usr/bin/wget does not seems to have permission to execute for the current user.
It may be easier to write a script (say mydebug.sh ) and run the script with cron
id
ls -l /usr/bin/wget
curl ...
Then check for any obvious errors due to permissions.

Adding a cronjob into cPanel

I just need to run the following url using cron jobs in my cPanel.
When I am trying to execute the link
http://www.insidewealth.com.au/index.php?option=com_acymailing&ctrl=cron
the link is running in browser but when I am tried to add the same URL as it is in cron jobs I am getting the following error
bash/sh/ file not found
and when I edited the cron job as
/usr/bin/php /home/staging/public_html/index.php?option=com_acymailing&ctrl=cron
but I am getting 404 error.
My cPanel username is staging
Can anybody tell me what's the syntax of cron job in cPanel.
Cron Job running every minute and email report showing this errors.
Use wget function with full URL.
#yannick-blondeau As suggested you can use a wget or curl to make a simple request to your website.
Usually wget will attempt to download a file but this is not necessary with the -O flag to pipe to /dev/null or -q (both options used to prevent from saving output to a file), an example will look like
wget -O /dev/null http://www.insidewealth.com.au/index.php?option=com_acymailing&ctrl=cron
wget -q http://www.insidewealth.com.au/index.php?option=com_acymailing&ctrl=cron
You can also use curl for the same effect
curl --silent http://www.insidewealth.com.au/index.php?option=com_acymailing&ctrl=cron

cron job on plesk

So far I have tried:
php -q /var/www/vhosts/mediaservises.me/site1/ems/admin/cron/cron.php
php -f /var/www/vhosts/mediaservises.me/site1/ems/admin/cron/cron.php
site1/ems/admin/cron/cron.php
But none of them are working on plesk
What is wrong in my cron job command?
I want to run cron.php every 5 minutes.

Resources