following is my recipe I am trying to create a new text file with current time and date
cron 'cron_disply_time' do
minute '*/1'
command "echo #{Time.new.strftime("%Y-%m-%d %H:%M")} > /home/vagrant/learn-cron/cookbooks/t.txt"
action :create
end
Its always taking the time when the job was added
*/1 * * * * echo 2020-05-07 14:06 > /home/vagrant/learn-cron/cookbooks/t.txt
can some please let me know how can I make it executable with the recipe only