back to phpList.org

How do I setup Cron (2017)?


#1

Hi,

I need a guide how to setup crontab the manual way. I know, that there help page, but this is very old and I can’t find the mentioned things in config or processque (it’s about 10 years old).

I don’t understand, if you have to put the in the commandline (putty with my host) a instruction or in config.php something.?

All guides made it worse, because they are all using different aproaches.

Here is my settings:

I have managed server and want to limit the mails to 150 per Hour with 1 second between the messages.

The cronjob should be executed every hour. In about a week, the newsletter is sent fully.

Now I tell you, what my managed server does support:

PHP 4.4.9 (cgi-fcgi)
Copyright © 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright © 1998-2004 Zend Technologies

Now I need to know, how can I configure cronjob like statet without using cPanel (which I’m not using anyway) or without signing to some cronjobing service including phplist.org too…
I need know, what kind of a file I have to create (or need to a create file??) and what kind of instuction I have write in putty to let the executable to execute and which software you recommendend like putty…or how you did it.

If you need more help, please tell me.

Thanks

EDIT:

I found a now the official website for Cron Jobs, which is indeed new. Will take a look and then tell you, if I need help or not. Official Cron Job help page is: https://www.phplist.org/manual/ch036_setting-up-your-cron.xhtml


#2

Okay after some research, this thing is very confusing. Can you at least tell me, which editor you use, which is avaiable for windows too?


#3

@thebyom “cron job” is specific to Linux/Unix. If your server is Windows then you need to look at creating a scheduled task.

If all of this is unfamiliar to you or difficult to understand then you might want to consider using phplist hosted instead. There is a monthly charge but it takes away all of the problems that you seem to be having.


#4

Sir,

I’m hosting it from 1und1, Where I’ve already installed phplist to a directory of my website. I created a dB there and it works. But the problem was, that I had to let open my pc and browser, which logged out, because the session was over.

There are to much mails, I’m sorry I can’t open my browser every two hours. So I looked about everything and yes there was a solution. Cron jobs. My hoster supports Cron job. This means I don’t have to let my pc and my browser open. But there are to many questions with configuration.

First of all, I already got with ssh client putty into network and then saved it. But the phplist (file in the directory usr/bin/) configuration is wrong or I don’t understand.

I have all my passwords for ftp and ssh and so on. I know how to login via putty to ssh.

But there are problems

1.) Where should I store the phplist (file)?

2.) #!/bin/bash what should I change it on my server?

3.) usr/bin/php I have changed it to following usr/bin/php5.5.cli is that right?

4.) phplist installed on /lists/admin is that okay or how should it be properly installed.

5.) how do I setup a Cronjob hourly mentioned in the post above.

6.) where can I know my domains full path or right path. For example my domain is

Www.test.com

And phplist is installed on:

www.test.com/lists/admin

How should I change it in the phplist file

Something like that:

Home/www.test.com/lists/admin…

Or

Home/test.com/lists/admin

Or

test.com/lists/admin.

Absolutely don’t know how to make this.


#5

That is why I suggest that you use phplist hosted - https://www.phplist.com/

Alternatively you can consider paying for support to configure phplist, see https://www.phplist.org/paid-support/


#6

Sir Duncanc,

I know this, but I want to try out first. Can I ask you, how you setup your phplist cronjob? Of course replace your domain name with something else like “test” or “fontain”.


#7

Sir Dunarc,

I made it. Here’s the cronjob example for 1&1 1und1 1and1:

MAILTO="Mymail@mymail.com"
*/10 * * * * usr/bin/curl -s 'http://www.mydomain.com/lists/admin/index.php? Page=processqueue&secret=mysecretcode

My secret code you will find in settings of phplist.

It will send every ten minute with these settings.

I need to ask, how much mails does this process per que. I made 3600 seconds against 150 mails, 1 second between the mails but only 34 mails get processed. And the cronjob is set up to 59 minutes. Don’t want to make my hoster angry.

Ps: you can login with putty via ssh to your account and then you can edit your cronjob like this.

Crontab - e
Than go down with keyboard arrows
Then press I like "insert"
Copy the code in above in (of course you need to change it for your installation)
Press ESC
Press :wq
It should tell you "installing new tab"
And the close putty and enjoy the crontab messages sent to your mail.