Setting up a crontab by doing "sudo crontab -e"?

I am trying to trigger emails the moment a lead enters our system, and we need a workflow for this, along with a cron job set up on our server, which we have done. However, I have seen in a past post regarding a “sudo crontab -e” which needs to be run in order for the cron jobs to even work.

Here is an excerpt from the post: "Have you set up your crontab correctly by doing “sudo crontab -e”

Response: The “sudo crontab -e” was what I needed to do. Once I did that, my workflow ran.

What exactly needs to be done in order for the sudo crontab -e to activate the workflow? I’m not sure what transpired in the above messages.
NOTE: I use as my web host with Linux.

In the Scheduler list in the admin panel it will say to enter the following into the crontab

so using “crontab -e”

enter what is said in your scheduler list view. making sure that it points to your instance

          • cd /var/www/suitecrm-7.1.4-max; php -f cron.php > /dev/null 2>&1

The jobs should start to update the last run date/time when the jobs are finished.

We did all of that, however, the scheduler still says queued. Could it be that the workflow is not triggered properly?

I have attached a screenshot of the workflow, and the scheduler currently.

Looks like the cron is working by the looks of that.

do you have any other scheduler jobs set to active? which are in progress ?

Attached is a screenshot of all of the workflows that came default with SuiteCRM, but I don’t use them necessarily.

could you update them all to inactive and only have the AOW one running ?

just rules out if there is a issue with something else and not AOW.

I have made all schedulers inactive except the “Work Flow Scheduler”.

need to wait now and see what happens to the job in the Workflow job list. will either pass or fail but if memory serves it could take up to an hour to change the status if it has failed.

then run a test and see if that has changed anything.

now looking at the workflow, I have never ran a worklow on the minute it was created. however I dont see why it wouldnt work. might be worth unticking the repeated runs tho as this can cause it to just keep running indefinitely. This will also fill up the job status list fairly quickly.

Every time I run the scheduler manually I get these errors:

[Wed Nov 19 05:47:14 2014] [error] [client] exec used but not allowed in /home/baltim19/public_html/unitedcoachways/500.shtml, referer:

Also getting this weird error:

[Wed Nov 19 05:54:34 2014] [error] [client] SoftException in Application.cpp:256: File “/home/baltim19/public_html/unitedcoachways/suitecrm/themes/Suite7/css/colourSelector.php” is writeable by group, referer:

I have had a look about for both these errors and appears that others are having this problem which seems to point to a issue with how the apache is configured, by any chance are you using cpanel on the server ? all the users which have had this issue appear to be using a server with cpanel installed.

This appears to point to permission issues, mostly caused by the given folder being set to 777. again seems related to cpanel and web applications. are your permissions set correctly ?

This error looks like its the cause of another error. so the server has errored on something to result in it trying to display a 500 error. was there any other errors just above this one ?

Ok, so I fixed that, that did have some permission issues that should be good now. What we did do is upgrade to the 7.1.4 but now I have a bigger issue,but the scheduler still isn’t working. Anytime I edit a lead and try to save I get this error in the mysql. I’ve seen this problem a few other places, but nothing seems to fix mine. HELLLPPPPP !

Wed Nov 19 13:27:14 2014 [28214][c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20][FATAL] Error updating table: leads: Query Failed: UPDATE leads
SET date_modified=‘2014-11-19 20:27:14’,modified_user_id=‘c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20’,created_by=‘1’,description=‘Party Buses - 80 Pass Party Bus’,assigned_user_id=‘c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20’,salutation=NULL,first_name=NULL,last_name=‘Steven’,title=NULL,department=NULL,do_not_call=0,phone_home=NULL,phone_mobile=‘410-972-7034’,phone_work=NULL,phone_other=NULL,phone_fax=NULL,primary_address_street=NULL,primary_address_city=NULL,primary_address_state=NULL,primary_address_postalcode=NULL,primary_address_country=NULL,alt_address_street=NULL,alt_address_city=NULL,alt_address_state=NULL,alt_address_postalcode=NULL,alt_address_country=NULL,assistant=NULL,assistant_phone=NULL,converted=0,refered_by=NULL,lead_source=NULL,lead_source_description=NULL,status=‘Recycled’,status_description=NULL,reports_to_id=’’,account_name=NULL,account_description=NULL,contact_id=’’,account_id=’’,opportunity_id=’’,opportunity_name=NULL,opportunity_amount=NULL,campaign_id=’’,birthdate=NULL,portal_name=NULL,portal_app=NULL,website=NULL,=NULL
WHERE = ‘625741e7-78de-fb5a-ad4c-546a62c36d8b’ AND deleted=0: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘=NULL
WHERE = ‘625741e7-78de-fb5a-ad4c-546a62c36d8b’ AND deleted’ at line 2

Ok,… after hours of “tinkering around” I finally cleared all the errors on this. It was mostly all permission errors like originally stated. But, the thing still is not working??? OMG!! … I have NO errors when I run this manually. And it seems to be triggering the cron.php every 5 mins. But no errors and it still says the work flow scheduler (or any of the cron jobs) have never ran?

I don’t get it, any input would help!