Mautic Community Forums

Mautic CRON outputs --help

Hello,



I am trying to create the CRON job to process the emails.

I have been logging the output of the CRON job, at it’s just as follows.



My CRON job is:

          • php /home/gbizituk/public_html/mautic/app/console mautic:email:process -e prod >/home/gbizituk/public_html/cron.log 2>&1



            The output is:



            Mautic version 1.2.2 - app/prod



            Usage:

            command [options] [arguments]



            Options:

            –help (-h) Display this help message

            –quiet (-q) Do not output any message

            –verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

            –version (-V) Display this application version

            –ansi Force ANSI output

            –no-ansi Disable ANSI output

            –no-interaction (-n) Do not ask any interactive question

            –shell (-s) Launch the shell.

            –process-isolation Launch commands from shell as a separate process.

            –env (-e) The Environment name. (default: “prod”)

            –no-debug Switches off debug mode.



            Available commands:

            help Displays help for a command

            list Lists commands

            assets

            assets:install Installs bundles web assets under a public web directory

            bazinga

            bazinga:oauth-server:clean Clean expired tokens

            cache

            cache:clear Clears the cache

            cache:warmup Warms up an empty cache

            config

            config:debug Dumps the current configuration for an extension

            config:dump-reference Dumps the default configuration for an extension

            container

            container:debug Displays current services for an application

            debug

            debug:swiftmailer Displays current mailers for an application

            doctrine

            doctrine:cache:clear Flush a given cache

            doctrine:cache:clear-metadata Clears all metadata cache for an entity manager

            doctrine:cache:clear-query Clears all query cache for an entity manager

            doctrine:cache:clear-result Clears result cache for an entity manager

            doctrine:cache:contains Check if a cache entry exists

            doctrine:cache:delete Delete a cache entry

            doctrine:cache:flush Flush a given cache

            doctrine:cache:stats Get stats on a given cache provider

            doctrine:database:create Creates the configured databases

            doctrine:database:drop Drops the configured databases

            doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment.

            doctrine:fixtures:load Load data fixtures to your database.

            doctrine:generate:entities Generates entity classes and method stubs from your mapping information

            doctrine:mapping:convert Convert mapping information between supported formats.

            doctrine:mapping:import Imports mapping information from an existing database

            doctrine:mapping:info

            doctrine:migrations:diff Generate a migration by comparing your current database to your mapping information.

            doctrine:migrations:execute Execute a single migration version up or down manually.

            doctrine:migrations:generate Generate a blank migration class.

            doctrine:migrations:latest Outputs the latest version number

            doctrine:migrations:migrate Execute a migration to a specified version or the latest available version.

            doctrine:migrations:status View the status of a set of migrations.

            doctrine:migrations:version Manually add and delete migration versions from the version table.

            doctrine:query:dql Executes arbitrary DQL directly from the command line.

            doctrine:query:sql Executes arbitrary SQL directly from the command line.

            doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema

            doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema

            doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.

            doctrine:schema:validate Validate the mapping files.

            fos

            fos:oauth-server:clean Clean expired tokens

            generate

            generate:doctrine:entities Generates entity classes and method stubs from your mapping information

            init

            init:acl Mounts ACL tables in the database

            mautic

            mautic:assets:generate Combines and minifies asset files from each bundle into single production files

            mautic:campaign:trigger Trigger timed events for published campaigns.

            mautic:campaigns:rebuild Rebuild campaigns based on lead lists.

            mautic:campaigns:trigger Trigger timed events for published campaigns.

            mautic:campaigns:update Rebuild campaigns based on lead lists.

            mautic:check:email Fetch and process monitored email.

            mautic:check:mail Fetch and process monitored email.

            mautic:email:process Processes SwiftMail’s mail queue

            mautic:emails:process Processes SwiftMail’s mail queue

            mautic:fetch:email Fetch and process monitored email.

            mautic:fetch:mail Fetch and process monitored email.

            mautic:install:data Installs Mautic with sample data

            mautic:leadlists:rebuild Update leads in smart lists based on new lead data.

            mautic:leadlists:update Update leads in smart lists based on new lead data.

            mautic:lists:rebuild Update leads in smart lists based on new lead data.

            mautic:lists:update Update leads in smart lists based on new lead data.

            mautic:process:email Processes SwiftMail’s mail queue

            mautic:process:emails Processes SwiftMail’s mail queue

            mautic:process:webhooks Process queued webhook payloads

            mautic:rebuild:campaigns Rebuild campaigns based on lead lists.

            mautic:rebuild:leadlists Update leads in smart lists based on new lead data.

            mautic:rebuild:lists Update leads in smart lists based on new lead data.

            mautic:send:email Processes SwiftMail’s mail queue

            mautic:send:emails Processes SwiftMail’s mail queue

            mautic:transifex:pull Fetches translations for Mautic from Transifex

            mautic:transifex:push Pushes Mautic translation resources to Transifex

            mautic:translation:createconfig Create config.php files for translations

            mautic:translation:debug Displays translation messages informations

            mautic:trigger:campaign Trigger timed events for published campaigns.

            mautic:trigger:campaigns Trigger timed events for published campaigns.

            mautic:update:apply Updates the Mautic application

            mautic:update:campaigns Rebuild campaigns based on lead lists.

            mautic:update:find Fetches updates for Mautic

            mautic:update:leadlists Update leads in smart lists based on new lead data.

            mautic:update:lists Update leads in smart lists based on new lead data.

            mautic:webhooks:process Process queued webhook payloads

            oneup

            oneup:uploader:clear-chunks Clear chunks according to the max-age you defined in your configuration.

            oneup:uploader:clear-orphans Clear orphaned uploads according to the max-age you defined in your configuration.

            orm

            orm:convert:mapping Convert mapping information between supported formats.

            router

            router:debug Displays current routes for an application

            router:dump-apache Dumps all routes as Apache rewrite rules

            router:match Helps debug routes by simulating a path info match

            server

            server:run Runs PHP built-in web server

            swiftmailer

            swiftmailer:debug Displays current mailers for an application

            swiftmailer:email:send Send simple email message

            swiftmailer:spool:send Sends emails from the spool

            translation

            translation:debug Displays translation messages informations

            translation:update Updates the translation file

            yaml

            yaml:lint Lints a file and outputs encountered errors

            X-Powered-By: PHP/5.4.45

            Set-Cookie: d4c21fc302893d3376cca6c34ee983c3=8r0kgj97uph4mgc0kn8bgim046; path=/

            Content-type: text/html


Hello,

I am trying to create the CRON job to process the emails.
I have been logging the output of the CRON job, at it’s just as follows.

My CRON job is:
* * * * * php /home/gbizituk/public_html/mautic/app/console mautic:email:process -e prod >/home/gbizituk/public_html/cron.log 2>&1

The output is:

Mautic version 1.2.2 - app/prod

Usage:
command [options] [arguments]

Options:
–help (-h) Display this help message
–quiet (-q) Do not output any message
–verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
–version (-V) Display this application version
–ansi Force ANSI output
–no-ansi Disable ANSI output
–no-interaction (-n) Do not ask any interactive question
–shell (-s) Launch the shell.
–process-isolation Launch commands from shell as a separate process.
–env (-e) The Environment name. (default: “prod”)
–no-debug Switches off debug mode.

Available commands:
help Displays help for a command
list Lists commands
assets
assets:install Installs bundles web assets under a public web directory
bazinga
bazinga:oauth-server:clean Clean expired tokens
cache
cache:clear Clears the cache
cache:warmup Warms up an empty cache
config
config:debug Dumps the current configuration for an extension
config:dump-reference Dumps the default configuration for an extension
container
container:debug Displays current services for an application
debug
debug:swiftmailer Displays current mailers for an application
doctrine
doctrine:cache:clear Flush a given cache
doctrine:cache:clear-metadata Clears all metadata cache for an entity manager
doctrine:cache:clear-query Clears all query cache for an entity manager
doctrine:cache:clear-result Clears result cache for an entity manager
doctrine:cache:contains Check if a cache entry exists
doctrine:cache:delete Delete a cache entry
doctrine:cache:flush Flush a given cache
doctrine:cache:stats Get stats on a given cache provider
doctrine:database:create Creates the configured databases
doctrine:database:drop Drops the configured databases
doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment.
doctrine:fixtures:load Load data fixtures to your database.
doctrine:generate:entities Generates entity classes and method stubs from your mapping information
doctrine:mapping:convert Convert mapping information between supported formats.
doctrine:mapping:import Imports mapping information from an existing database
doctrine:mapping:info
doctrine:migrations:diff Generate a migration by comparing your current database to your mapping information.
doctrine:migrations:execute Execute a single migration version up or down manually.
doctrine:migrations:generate Generate a blank migration class.
doctrine:migrations:latest Outputs the latest version number
doctrine:migrations:migrate Execute a migration to a specified version or the latest available version.
doctrine:migrations:status View the status of a set of migrations.
doctrine:migrations:version Manually add and delete migration versions from the version table.
doctrine:query:dql Executes arbitrary DQL directly from the command line.
doctrine:query:sql Executes arbitrary SQL directly from the command line.
doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema
doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema
doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.
doctrine:schema:validate Validate the mapping files.
fos
fos:oauth-server:clean Clean expired tokens
generate
generate:doctrine:entities Generates entity classes and method stubs from your mapping information
init
init:acl Mounts ACL tables in the database
mautic
mautic:assets:generate Combines and minifies asset files from each bundle into single production files
mautic:campaign:trigger Trigger timed events for published campaigns.
mautic:campaigns:rebuild Rebuild campaigns based on lead lists.
mautic:campaigns:trigger Trigger timed events for published campaigns.
mautic:campaigns:update Rebuild campaigns based on lead lists.
mautic:check:email Fetch and process monitored email.
mautic:check:mail Fetch and process monitored email.
mautic:email:process Processes SwiftMail’s mail queue
mautic:emails:process Processes SwiftMail’s mail queue
mautic:fetch:email Fetch and process monitored email.
mautic:fetch:mail Fetch and process monitored email.
mautic:install:data Installs Mautic with sample data
mautic:leadlists:rebuild Update leads in smart lists based on new lead data.
mautic:leadlists:update Update leads in smart lists based on new lead data.
mautic:lists:rebuild Update leads in smart lists based on new lead data.
mautic:lists:update Update leads in smart lists based on new lead data.
mautic:process:email Processes SwiftMail’s mail queue
mautic:process:emails Processes SwiftMail’s mail queue
mautic:process:webhooks Process queued webhook payloads
mautic:rebuild:campaigns Rebuild campaigns based on lead lists.
mautic:rebuild:leadlists Update leads in smart lists based on new lead data.
mautic:rebuild:lists Update leads in smart lists based on new lead data.
mautic:send:email Processes SwiftMail’s mail queue
mautic:send:emails Processes SwiftMail’s mail queue
mautic:transifex:pull Fetches translations for Mautic from Transifex
mautic:transifex:push Pushes Mautic translation resources to Transifex
mautic:translation:createconfig Create config.php files for translations
mautic:translation:debug Displays translation messages informations
mautic:trigger:campaign Trigger timed events for published campaigns.
mautic:trigger:campaigns Trigger timed events for published campaigns.
mautic:update:apply Updates the Mautic application
mautic:update:campaigns Rebuild campaigns based on lead lists.
mautic:update:find Fetches updates for Mautic
mautic:update:leadlists Update leads in smart lists based on new lead data.
mautic:update:lists Update leads in smart lists based on new lead data.
mautic:webhooks:process Process queued webhook payloads
oneup
oneup:uploader:clear-chunks Clear chunks according to the max-age you defined in your configuration.
oneup:uploader:clear-orphans Clear orphaned uploads according to the max-age you defined in your configuration.
orm
orm:convert:mapping Convert mapping information between supported formats.
router
router:debug Displays current routes for an application
router:dump-apache Dumps all routes as Apache rewrite rules
router:match Helps debug routes by simulating a path info match
server
server:run Runs PHP built-in web server
swiftmailer
swiftmailer:debug Displays current mailers for an application
swiftmailer:email:send Send simple email message
swiftmailer:spool:send Sends emails from the spool
translation
translation:debug Displays translation messages informations
translation:update Updates the translation file
yaml
yaml:lint Lints a file and outputs encountered errors
X-Powered-By: PHP/5.4.45
Set-Cookie: d4c21fc302893d3376cca6c34ee983c3=8r0kgj97uph4mgc0kn8bgim046; path=/
Content-type: text/html

Can you check to see if the lack of a space between ‘>’ and ‘/home/gbizituk/public_html/cron.log 2>&1’ could be causing it?

> /home/gbizituk/public_html/cron.log 2>&1

It may be that without that space, Linux is not recognizing it and thus passing it as an argument to the script which will then reject it as being unrecognized.

I even tried with just:

php /home/gbizituk/public_html/mautic/app/console mautic:email:process

But the e-mail are still shown as “8 Pending”.

mautic:email:process is used to send email saved to the filesystem when the system is configured to Queue email. It does not process email lists. If you are seeing 8 pending, you have to manually initiate the list send by clicking Send form the email’s action drop down in the Email list or on the specific email’s detail page. List sends are not currently automated.

If you want an automated process, use a campaign instead and use the mautic:campaign:trigger command to process the campaigns.

https://www.mautic.org/docs/setup/index.html

Thanks,
Alan