This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

cronjob error
#1
[Not Solved] cronjob error
I'm trying to install mailwizz on sentora server.

Everything works great until i have to add cron jobs. Error below and also attached screenshoot

Error:
"Error: Your script does not appear to exist at that location."


These are the cron jobs i have to add:
# Campaigns sender, runs each minute.
* * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php send-campaigns >/dev/null 2>&1

# Transactional email sender, runs once at 2 minutes.
*/2 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php send-transactional-emails >/dev/null 2>&1

# Bounce handler, runs once at 10 minutes.
*/10 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php bounce-handler >/dev/null 2>&1

# Feedback loop handler, runs once at 20 minutes.
*/20 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php feedback-loop-handler >/dev/null 2>&1

# Delivery/Bounce processor, runs once at 3 minutes.
*/3 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php process-delivery-and-bounce-log >/dev/null 2>&1

# Various tasks, runs each hour.
0 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php hourly >/dev/null 2>&1

# Daily cleaner, runs once a day.
0 0 * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php daily >/dev/null 2>&1


Attached Files Thumbnail(s)
   
Reply
Thanks given by:
#2
[Not Solved] RE: cronjob error
(12-06-2018, 01:06 AM)websol24 Wrote: I'm trying to install mailwizz on sentora server.

Everything works great until i have to add cron jobs. Error below and also attached screenshoot

Error:
"Error: Your script does not appear to exist at that location."


These are the cron jobs i have to add:
# Campaigns sender, runs each minute.
* * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php send-campaigns >/dev/null 2>&1

# Transactional email sender, runs once at 2 minutes.
*/2 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php send-transactional-emails >/dev/null 2>&1

# Bounce handler, runs once at 10 minutes.
*/10 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php bounce-handler >/dev/null 2>&1

# Feedback loop handler, runs once at 20 minutes.
*/20 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php feedback-loop-handler >/dev/null 2>&1

# Delivery/Bounce processor, runs once at 3 minutes.
*/3 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php process-delivery-and-bounce-log >/dev/null 2>&1

# Various tasks, runs each hour.
0 * * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php hourly >/dev/null 2>&1

# Daily cleaner, runs once a day.
0 0 * * * /usr/bin/php -q /var/sentora/hostdata/zadmin/public_html/onmails_eu/apps/console/console.php daily >/dev/null 2>&1

Have you tried adding the tasks without the "/usr/bin/php -q" at the start? I don't remember off the top of my head the syntax for cron commands in Sentora, but I've a funny feeling that you're only able to add the path to the script. The PHP bit is taken care of by Sentora.

So try add JUST the path to the php script and nothing else and see if it works.

Keith

Edit: You also don't need the full path as you have added it, it only needs to be relative to the public_html folder, so for example:


Code:
onmails_eu/apps/console/console.php send-campaigns


would be the first one.

Give that a try and see if it starts working.

Keith
Reply
Thanks given by:
#3
[Not Solved] RE: cronjob error
You cannot add anything after the php file name. You need to do a work around mentioned here:
http://forums.sentora.org/showthread.php...72#pid6072

And:
http://forums.sentora.org/showthread.php...75#pid6075
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:
#4
[Not Solved] RE: cronjob error
(12-10-2018, 04:08 AM)TGates Wrote: You cannot add anything after the php file name. You need to do a work around mentioned here:
http://forums.sentora.org/showthread.php...72#pid6072

And:
http://forums.sentora.org/showthread.php...75#pid6075

Ah OK, I haven't played around much with the CRON module so didn't realise that we cannot include commands...

...however, I think we can fix this with just one change.

Edit:

Code:
/etc/sentora/panel/modules/cron/code/controller.ext.php

Find the following line:

Code:
if (!is_file(fs_director::RemoveDoubleSlash(fs_director::ConvertSlashes(ctrl_options::GetSystemOption('hosted_dir') . $currentuser['username'] . '/public_html/' . ltrim($controller->GetControllerRequest('FORM', 'inScript'),"/"))))) {

and change it to:

Code:
if (!is_file(fs_director::RemoveDoubleSlash(fs_director::ConvertSlashes(ctrl_options::GetSystemOption('hosted_dir') . $currentuser['username'] . '/public_html/' . strtok(ltrim($controller->GetControllerRequest('FORM', 'inScript'),"/"),' '))))) {

This simply removes any arguments after a space in the cron command when checking that the file exists. It also allows running the same file but with different arguments as separate crons, whilst still preventing more than one cron with the exact same command/argument combination.

As I always say, try it and see. If you don't like it you can edit the file and put the original line back in.

Keith.


Attached Files Thumbnail(s)
   
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Error establishing a database connection how to fix realfix247 1 643 08-16-2018, 07:16 AM
Last Post: TGates
zannounce Couldn't upload the file, 1 Error mitolocya 5 5,351 05-31-2018, 05:04 AM
Last Post: 777user
Main login page showing 500 error sudinm 5 1,173 03-27-2018, 05:07 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)