Cron is not executing latest file version - cron

I had setup a php file to run via cron.
The problem i got now is after adding to cron what ever change i made to the php file is not taken in considertion.
it keep executin my first version of that file.
i got this problem after updating WHM.
When i googled someone said it might be because of jailed shell access.
i disabled that from WHM and restared the server.
Still no luck...
Any help much apreciated...
Thanks in advance

Related

Raspberry Pi boot script duplicating

I am trying to run a few scripts at each boot of the raspberry pi. I have been able to verify that when they are not configured to start automatically, I can run them, and they all work exactly as intended (and in only one instance). I have tried quite a few methods of autostarting these scripts, and I have found that using a desktop entry in .config/autostart directory to be my preferred way of doing it. I have also tried editing rc.local, crontab, systemd, and entries in .config/lxsession/LXDE-pi/autostart with no more success.
The issue is that when I have the scripts running at boot, there is a duplicate of the script running (I have it set to open a new instance of LXterminal, though there are not duplicates of the terminal). The script runs at boot just fine, but I am cannot figure out why there seems to be a "ghost" version of the script too. I have the autostart commands set to write to log files that show that the scripts are running more than once. I have also tried this on a fresh raspbian install. Could someone help me figure this out? I'm at a loss on what my issue is. This is for use of Amazon Alexa.
This is what I have in /home/pi/.config/autostart/AlexaBoot.desktop:
[Desktop Entry]
Name=AlexaBoot
Exec=lxterminal -e "/bin/bash /home/pi/Desktop/alexa_boot.sh"
Type=Application
I can post what I have in the autostarted script if necessary. Thanks.
Found a fix for this. My solution is outlined on a similar Github issue, hopefully this is able to help someone with the same issue.

Linux XAMPP suddenly requires 32 bit compatibility library

I have been working with linux's version of XAMPP (named LAMPP) for about 3 months now and up until tonight XAMPP has worked fine, but suddenly when I tried to run the command
sudo xampp stop
it gave me this error message:
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
and since then any time I try to run any of the following commands:
sudo xampp start
sudo xampp stop
sudo xampp restart
I get the same message
I want to know why I got this message because xampp has been working flawlessly up until now and in fact, less than 30 minutes ago, I typed sudo xampp start and xampp started up normally and I was able to access localhost/phpmyadmin/
Here is some other info that may be useful:
-My OS is Arch Linux
-I am using the xfce desktop environment
-In the time between starting xampp successfully and trying to stop xampp when I got the error message above, I was trying to get the php mail() function to work by following the steps on this page http://www.absolutelytech.com/2010/07/18/howto-send-emailsusing-mail-function-from-localhost-in-php-through-msmtp-using-gmail-account-on-linux/ and I had just successfully finished step 1 and successfully sent the test email to myself.
-also, when I first got the aforementioned error message, I was still able to access pages via localhost (for instance I had a php file at /opt/lampp/htdocs/Brown/index.php that I could access successfully by typing localhost/Brown/index.php even after I was getting the error message) but then I tried to restart my computer to see if that might fix the issue and now I can't start xampp to begin with.
Please someone help me with this and feel free to ask any follow-up questions if that will help
I figured out my own issue. For anyone who sees this question, I had made a few changes to my php.ini file in attempts to get php's mail() function to work and I wanted to start fresh, so I moved php.ini to php_old.ini and copied a file named php.ini-pre1.7.2 to php.ini thinking that php.ini-pre1.7.2 was a file containing the default configuration of php.ini in case one might want to roll back to the defaults, but instead it is something entirely different. My issue was completely fixed when I moved php_old.ini back to php.ini
2021 and the same happened to me after trying to match php.ini seetings between a Windows environment and a Ubuntu 20.04 one. Everywhere I saw it told me to comment a section in the /opt/lampp/lampp file but it messed up my installation and I lost track of what was wrong. After re-installing LAMPP I matched the settings one by one restarting with sudo opt/lampp/lampp restart at each modification. The culprit was:
browscap="C:\xampp\php\extras\browscap.ini"
This line has to be stay commented (just put a semicolon at the start of the line), if you need it then this workaround may help you. Cheers!

"Could not open input file" crons error

There are a few other questions on Stack Overflow about this and I do understand that, but none of them are giving me an idea of why im getting the "Could not open input file".
I have it setup so I get an email everytime a crons runs (im using cPanal to set the crons) but all I get is:
Could not open input file: /home/methodjs/classified/emailNotifications.php
Because is the first time i'm using crons jobs I have no idea what this means or how fix it.
My command line is:
/usr/local/bin/php $HOME/classified/emailNotifications.php
Am I doing something wrong? Thanks for any help. By the way, i'm sure thats the right path to PHP because thats what I got from my host.
ensure file is located here:
/home/methodjs/classified/emailNotifications.php
try to execute from commandline:
/usr/local/bin/php /home/methodjs/classified/emailNotifications.php
what appears?
ensure your php file has execution rights
chmod 755 /home/methodjs/classified/emailNotifications.php
The error appears either file is not present at given path or proper permission are not set for file. It can be checked by navigating to path and ll for checking permission.
All,
This problem started occurring on all my 20 Kubuntu machines after an update from Ubuntu! Since Ubuntu is Debian based not sure if Debian or Ubuntu is to blame, so investigating!
Debian users, if this is also impacting you please reply so we can investigate further!
Cheers!

Can Jenkins monitor cron jobs that I run using crontab?

I have written some cron jobs using the crontab feature on my ubuntu. Can I use Jenkins to monitor these jobs?
Edit 1: I have Jenkins already installed on my local machine: localhost:8080. So right now, I have cronjobs running on crontab. I cannot create a new job on Jenkins and run them on Jenkins's shell because of certain requirements.
Following Pragmatic's solution, I looked at https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs and tried to sudo apt-get install jenkins-external-tool-monitor, but I am getting: E: Couldn't find package jenkins-external-tool-monitor. Any work arounds?
Edit 2: I have figured it out. Very Important: I tried to set this up using jenkins-core-1.47*.jar file, and it didnt work. It did work with jenkins-core-1.466.jar. So if you are using some .jar file, stop jenkins, replace it with a jenkins.war that corresponds to jenkins-core-1.466.jar and start jenkins after. That should work!
Yes, you can do that!!
Have a look at this link: Monitoring external jobs.
I could have explained the whole method here itself but the details in the question were minimal.
Hope this helps you.
Possible...See this
https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs
As others have stated above, follow: https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs
Then I started getting this ugly error: https://issues.jenkins-ci.org/browse/JENKINS-14107
If you face this problem as well, replace the current jenkins.war file with one from version 1.466. That is the one that worked for me. Before I replaced the war file, I stopped the jenkins server by : /etc/init.d/jenkins -stop and then replaced the war file and then started the server: /etc/init.d/jenkins -start
An alternative approach is to use an instance of Jenkins to replace your cron jobs entirely.
See:
Drop that cron; use Hudson instead
Replace Local Cron With Jenkins

Hudson does not want to start in Opensuse anymore. Empty pid file

I installed using the hudson.rpm as specified on the site provided. I also installed ant after starting hudson, for some reason when i try to run
/etc/init.d/hudson start
it just fails saying
Starting Hudson startproc: Empty pid
file /var/run/hudson.pid for
/usr/lib/jvm/java/bin/java
Sorry if this is a stupid question, any help will by much appreciated
If your problem is related to the Jenkins issue 5020 then have a look on the committed patch. Resolved the issue for me.

Resources