Background:
I'm using Sass for CSS compilation with Bootstrap 3.
Created a gulp task to trigger the compilation. 'gulp style'
Got tired of executing the gulp style task every time I make a change to the scss file.
Found out about crontab. Created my cron-file.txt to execute a bash file every 30 secs. Answer Courtesy : Running a cron every 30 seconds
* * * * * /bin/bash -l -c "/my/path/autogulp.sh; sleep 30 ; /my/path/autogulp.sh"
autogulp.sh Contents
cd ~
cd /my/path/
gulp style
I tried running the commands manually and they seem to be working fine. Had to change the R/W mode for the cron-file.txt and autogulp.sh. But my objective isn't fulfilled yet. The 'gulp style' isn't working automatically every 30 secs.
I tried routing the std and error output to a file but the contents of the file are always empty.