How to create cron for a user?

@eris talk about a command from cron job as far as I understand.
What happens when you run that command as regular user?
Have you got any errors?

Under the {user}

/usr/bin/php /home/xxxx/web/xxxxx/public_html/wp-content/plugins/xxxx-xxxx/cronjob.php

If you login via ssh as use su user

And then run crontab -e you should be able to see the command in the list

Nothing happens. I do not receive a letter. Cron doesnā€™t work. I tried many times, different commands. The result is negative. I guess it doesnā€™t work. In any case, I would like to know that it works for others. And itā€™s bad that there is nothing in the wiki or documentation about the userā€™s cron.

I donā€™t use wordpress. Canā€™t this command work for me?

I wrote from another account, because there is a limit of 20 messages. The limit has ended.

I see.
Can you send me a private message here?
Provide with the additional details, so we communicate in Russian there in private messaging.

This might be helpful in this situations.

2 Likes

I found a solution to the problem. You cannot run cron manually from the server, this is already a problem. Itā€™s strange that this hasnā€™t been implemented. But as is.

So when I run cron after 1 minute it doesnā€™t work for me. Why?

The server time has not been changed. Although I changed the time zone in the server settings. I checked the time on the site, it showed correctly.

As a result, for me, kroner worked not after a minute, but after 1 hour and 1 minute.

It remains to be understood whether it is possible to change the time on the server in the panel? Or does it have to be done manually? I found a previous topic on this issue, do I offer it manually? I donā€™t know how now?

Maybe Hestia could show current server time at least in the Cron page.

I ended up doing the following:

Determine where the data is being loaded from
php -i | grep php.ini

I got: /etc/php/8.0/cli/php.ini
Find value:
;date.timezone =
Set up your zone:
date.timezone = Europe/Town
Reload php8.0-fpm

The cron time works correctly.

I checked it works too
/usr/bin/wget http://site.com/cron_check.php

Curl working variant
/usr/bin/curl --silent ā€˜https://site.com/cron_check.phpā€™ &>/dev/null

You have updated the caption. But all the inscriptions are in small letters. And resume (ā€˜Š’Š¾Š·Š¾Š±Š½Š¾Š²Šøтьā€™) with a big one. Looks ugly. Should be written in lower case. Or all with a big one.

You can also submit the changes via:
https://translate.hestiacp.com/projects/hestiacp/ru/default/?filters[term]=unsuspend&filters[user_login]=&filters[status]=current_or_waiting_or_fuzzy_or_untranslated&filter=Filter&sort[by]=priority&sort[how]=desc

To Create an account use the key ā€œhestiacpā€

Done, just as you wish in translation :grin:
BTW you can PM me in Russian, just in case your English is not fluent.

php -f /home/{user}/web/{domain.com}/public_html/script.php >/dev/null 2>&1

/dev/null 2>&1 >>> Disable system message