Direkt zum Inhalt

Lightsail Lamp Stack CRONS wont work

0

Hi.,

I have a LightSail running PHP LAMP stack 8.1, No matter how I try I cannot get crons to work correctly.

ps ax | grep cron Ss 0:00 /usr/sbin/cron -f pts/0 S+ 0:00 grep cron

service cron start -bash: service: command not found

service cron restart -bash: service: command not found

This is my Crontab -e

*/3 * * * * /usr/bin/curl -sS http://live.mysite.com/crons/cron.php >/dev/null >

*/3 * * * * WGET http://live.mysite.com/crons/cron.php >/dev/null 2>&1

*/3 * * * * php -q /opt/bitnami/apache/htdocs/crons/cron.php >/dev/null 2>&1


Am I Doing something wrong?

gefragt vor 2 Jahren455 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Hello.

Try running the following command to start it.

sudo systemctl start cron
sudo systemctl enable cron
sudo systemctl status cron
EXPERTE
beantwortet vor 2 Jahren
EXPERTE
überprüft vor einem Jahr
  • bitnami@ip-168-23-5-32:$ sudo systemctl enable cron Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable cron bitnami@ip-168-23-5-32:$ sudo systemctl start cron bitnami@ip-168-23-5-32:~$ sudo systemctl status cron ● cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2023-11-13 04:43:46 UTC; 2 days ago Docs: man:cron(8) Main PID: 204143 (cron) Tasks: 1 (limit: 1116) Memory: 2.6M CPU: 52.326s CGroup: /system.slice/cron.service └─204143 /usr/sbin/cron -f

    Nov 15 06:00:01 ip-168-23-5-32 CRON[231900]: pam_unix(cron:session): session opened for user bitnami(uid=1000) by (uid=0) Nov 15 06:00:01 ip-168-23-5-32 CRON[231901]: (bitnami) CMD (/usr/bin/curl -sS http://live.seggobal.com/crons/cron.php >/dev/null 2>&1) Nov 15 06:00:01 ip-168-23-5-32 CRON[231900]: pam_unix(cron:session): session closed for user bitnami Nov 15 06:03:01 ip-168-23-5-32 CRON[231934]: pam_unix(cron:session): session opened for user bitnami(uid=1000) by (uid=0) Nov 15 06:03:01 ip-168-23-5-32 CRON[231935]: (bitnami) CMD (/usr/bin/curl -sS http://live.seggobal.com/crons/cron.php >/dev/null 2>&1) Nov 15 06:03:01 ip-168-23-5-32 CRON[231934]: pam_unix(cron:session): session closed for user bitnami Nov 15 06:06:01 ip-168-23-5-32 CRON[23203

  • It seems that cron is running.

  • yes. I checked from the server,,Its working again,,Lets check 2-3 days,, thanks for the help

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.