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