Uploaded image for project: 'ASTPP Community'
  1. ASTPP Community
  2. ASTPPCOM-261

Crontab entries missing user which makes cron stop working entirely

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Done
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      The crontab entries are added without a user name which causes
      cron[510]: Error: bad username; while reading /etc/crontab
      cron[510]: (system) ERROR (Syntax error, this crontab file will be ignored)
      in syslog. This explains why my cron.hourly hasn't been running.

      Inserting a valid user (like root - NOT recommended for production) between the _ _ * and the cd makes it work

      # Generate Invoice
      0 1 * * * root cd /var/www/html/astpp/cron/ && php cron.php GenerateInvoice
      # Low balance notification
      0 1 * * * root cd /var/www/html/astpp/cron/ && php cron.php UpdateBalance
      # Low balance notification
      0 0 * * * root cd /var/www/html/astpp/cron/ && php cron.php LowBalance
      # Update currency rate
      0 0 * * * root cd /var/www/html/astpp/cron/ && php cron.php CurrencyUpdate
      # Email Broadcasting
      0 0 * * * root cd /var/www/html/astpp/cron/ && php cron.php BroadcastEmail
      

        Attachments

          Activity

            People

            Assignee:
            samir.doshi Samir Doshi
            Reporter:
            alexheylin alexheylin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: